Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping the data 1

Status
Not open for further replies.

HardHat

IS-IT--Management
Aug 7, 2003
14
US
Hi,

I have a code that creates 2 dynamic drop downlists, the second one dependant on what is selected in the first. This works well, but I need to be able to keep the data that is entered in all other fields (aprox 50 other fields).

A sample of the drop down list code is below. Many thanks for any help you can offer.

<%session.lcid=1033%>

<!-- #INCLUDE FILE="../Scripts/GetDatabase.asp" -->

<%

Dim strSearchResults

Dim RS, strSQL
Dim strRecords

'Open Database
DBConnect("adtracking.mdb")
'Create recordset
Set RS = Server.CreateObject("ADODB.Recordset")

'Check edit rights

Dim blnValidadtrackadprod, blnValidadtrackbiz, blnValidadtracksales, strEdName, strEdEmail
If Request.Cookies("LoopLogIn")("Name") <> "" Then
blnValidadtrackadprod = True
strEdName = Request.Cookies("LoopLogIn")("Name")
strEdEmail = Request.Cookies("LoopLogIn")("EmailAddress")
End If

if Request.Cookies("LoopLogIn")("adtracksales") = "True" Then
blnValidadtracksales = True
strEdName = Request.Cookies("LoopLogIn")("Name")
End If

if Request.Cookies("LoopLogIn")("adtrackadprod") = "True" Then
blnValidadtrackadprod = True
strEdName = Request.Cookies("LoopLogIn")("Name")
End If

if Request.Cookies("LoopLogIn")("adtrackbiz") = "True" Then
blnValidadtrackbiz = True
blnValidadtracksales = True
strEdName = Request.Cookies("LoopLogIn")("Name")
End If
%>


<html>
<head>
<script language="JavaScript">

function checkfields(){


var theStr = ''
var now = new Date()


var then = new Date(document.theForm.issuedate.value);
var selectedEdition = document.theForm.edition.value;
var gap = Math.round((then-now)/864e5);
var USEdition=selectedEdition.indexOf('- US');

if(gap <28 && document.theForm.lateauthor.value == 'No' && USEdition <0) theStr += 'This Non US booking is late, if you wish this to be passed to the Business Office for approval please choose "Yes" to authorise late booking, and re-send.\n' + gap
if(gap <35 && document.theForm.lateauthor.value == 'No' && USEdition >0) theStr += 'This US booking is late, if you wish this to be passed to the Business Office for approval please choose "Yes" to authorise late booking, and re-send.\n' + gap

if(document.theForm.advertiser.value == '') theStr += 'Advertiser\n'
if(document.theForm.issuedate.options[document.theForm.issuedate.selectedIndex].index == 0) theStr += 'Issue Date\n'
if(document.theForm.edition.options[document.theForm.edition.selectedIndex].index == 0) theStr += 'Edition\n'
if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagadd.value == '') theStr += 'New Agency Address\n'
if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagconname.value == '') theStr += 'New Agency Contact Name\n'
if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagtelno.value == '') theStr += 'New Agency Telephone Number\n'
if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagcode.value == '') theStr += 'New Agency Code\n'

if(document.theForm.bleed.value == '') theStr += 'Bleed\n'
if(document.theForm.newagency.value == '') theStr += 'newagency\n'
if(theStr == '') document.theForm.submit()
else alert('The following data is invalid:\n'+theStr)
}

function adcode(){
document.theForm.adcode.value =
document.theForm.magazine.value &
document.theForm.adsuff.value &
document.theForm.unique.value
}

function grossratecalc(){
var openratevalue = document.theForm.openrate.value - 0
var oldopenratevalue = document.theForm.oldopenrate.value - 0
var grossratevalue = document.theForm.grossrate.value - 0
var openratevalue = document.theForm.openrate.value - 0;
var pppvalue= document.theForm.ppp.value - 0;
var grossratevalue = document.theForm.grossrate.value - 0
var rpvalue = document.theForm.rp.value - 0

document.theForm.grossrate.value = (openratevalue+ ((openratevalue/100)*pppvalue))

if (document.theForm.oldopenrate.value != '') rpcalc()
if (document.theForm.oldopenrate.value != '')rpvcalc()
}

function rpcalc(){
var openratevalue = document.theForm.openrate.value - 0;
var oldopenratevalue = document.theForm.oldopenrate.value - 0;
rpdiffvalue = (openratevalue - oldopenratevalue);
rpvalue = (rpdiffvalue/openratevalue)*100;
document.theForm.rp.value = rpvalue
}

function rpvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var rpvalue= document.theForm.rp.value - 0;
document.theForm.rpv.value = grossratevalue/100*rpvalue;
}

function wpvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var wpvalue= document.theForm.wp.value - 0;
document.theForm.wpv.value = grossratevalue/100*wpvalue
}

function ncvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var ncvalue= document.theForm.nc.value - 0;
document.theForm.ncv.value = grossratevalue/100*ncvalue
}

function bavcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var bavalue= document.theForm.ba.value - 0;
document.theForm.bav.value = grossratevalue/100*bavalue
}

function pvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var pvalue= document.theForm.p.value - 0;

document.theForm.pv.value = grossratevalue/100*pvalue
}

function cvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var cvalue= document.theForm.c.value - 0;

document.theForm.cv.value = grossratevalue/100*cvalue
}

function dvdvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var dvdvalue= document.theForm.dvd.value - 0;

document.theForm.dvdv.value = grossratevalue/100*dvdvalue
}

function fvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var fvalue= document.theForm.f.value - 0;

document.theForm.fv.value = grossratevalue/100*fvalue
}

function fivcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var fivalue= document.theForm.fi.value - 0;

document.theForm.fiv.value = grossratevalue/100*fivalue
}

function odvcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var odvalue= document.theForm.od.value - 0;

document.theForm.odv.value = grossratevalue/100*odvalue
}

function netcalc(){
var grossratevalue = document.theForm.grossrate.value - 0;
var rpvvalue= document.theForm.rpv.value - 0;
var wpvvalue= document.theForm.wpv.value - 0;
var ncvvalue= document.theForm.ncv.value - 0;
var bavvalue= document.theForm.bav.value - 0;
var pvvalue= document.theForm.pv.value - 0;
var cvvalue= document.theForm.cv.value - 0;
var dvdvvalue= document.theForm.dvdv.value - 0;
var fvvalue= document.theForm.fv.value - 0;
var fivvalue= document.theForm.fiv.value - 0;
var odvvalue= document.theForm.odv.value - 0;

document.theForm.net.value = (document.theForm.grossrate.value - (rpvvalue+wpvvalue+ncvvalue+bavvalue+pvvalue+cvvalue+dvdvvalue+fvvalue+fivvalue+odvvalue))

}
function netnetcalc(){
var netvalue = document.theForm.net.value - 0;
var agcompervalue= document.theForm.agcomper.value - 0;

document.theForm.netnet.value = (netvalue - (netvalue/100*agcompervalue))
}

function prodpremcalc(){
var netnetvalue = document.theForm.netnet.value - 0;
var prodpremvalue= document.theForm.prodprem.value - 0;

document.theForm.ttlnetrev.value = (netnetvalue + (netnetvalue/100*prodpremvalue))
}
</script>

</head>

<title>Advertising Booking Form</title>
</head>
<body lang=EN-GB class="Normal">
<font face="Lucida Sans Unicode" color="#000080">
<img border="0" src="../images2/timelogo.gif"></font><table width="469" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>

<form action="addbooking.asp" method="post" name="theForm" id="theForm">
<td bgcolor="#768ABE" width="536">

<%if blnValidadtracksales = True then %><font face="Lucida Sans Unicode" color="#000080">
</font>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0" bordercolor="#111111" width="121%" height="100%" bgcolor="#99CCFF">
<tr>
<td width="47%" colspan="5" height="20" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080" size="6"><u>Advertising Booking Form</u></font><p>&nbsp;</td>
<td width="9%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Advertiser</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="advertiser" id="advertiser" size="35" ></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Parent Company</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="parentco" id="parentco" size="35" ></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Product</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="product" id="product" size="1">

<%

Dim strSQLproduct, RSproduct, currentproduct

Dim strRecordsproduct

Set RSproduct = Server.CreateObject("ADODB.Recordset")

strSQLproduct = "Select product from products order by unique"
RSproduct.Open strSQLproduct, DB


If Not RSproduct.EOF Then
strRecordsproduct = "<OPTION VALUE='0'>"
Do While Not RSproduct.EOF
strRecordsproduct = strRecordsproduct _
& "<OPTION VALUE='" & RSproduct("product") & "'>" & RSproduct("product") & vbCrLf
RSproduct.MoveNext
Loop
Else
strRecordsproduct = "<OPTION VALUE='0'>No records found"
End if
Response.Write strRecordsproduct
strRecordsproduct = ""
RSproduct.Close
%>
</SELECT></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Type of Company</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="cotype" id="cotype" size="35" ></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Publication</font></td>
<td width="12%" height="20" style="border-style: none; border-width: medium">
<font color="#000080" size="2" face="Lucida Sans Unicode">EMEA <INPUT type="checkbox" name="pubEMEA" id="pubEMEA" value="EMEA"></font></td>
<td width="7%" height="20" style="border-style: none; border-width: medium">
<font color="#000080" size="2" face="Lucida Sans Unicode">ASIA
<INPUT type="checkbox" name="pubASIA" id="pubASIA" value="ASIA"></font></td>
<td width="4%" height="20" style="border-style: none; border-width: medium">
<font color="#000080" size="2" face="Lucida Sans Unicode">SOPAC
<INPUT type="checkbox" name="pubSOPAC" id="pubSOPAC" value="SOPAC"></font></td>
<td width="19%" height="20" style="border-style: none; border-width: medium">
<font color="#000080" size="2" face="Lucida Sans Unicode">CANADA<INPUT type="checkbox" name="pubCANADA" id="pubCANADA" value="CANADA"></font></td>
<td width="9%" height="20" style="border-style: none; border-width: medium">
<font color="#000080" size="2" face="Lucida Sans Unicode">US<INPUT type="checkbox" name="pubUS" id="pubUS" value="US"></font></td>
<td width="14%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Edition</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="edition" id="edition" size="1">

<%

Dim strSQLedition, RSedition, currentedition

Dim strRecordsedition

Set RSedition = Server.CreateObject("ADODB.Recordset")

strSQLedition = "Select * from editions WHERE adprodonly = FALSE ORDER BY editions ASC"
RSedition.Open strSQLedition, DB


If Not RSedition.EOF Then
strRecordsedition = "<OPTION VALUE='0'>"
Do While Not RSedition.EOF
strRecordsedition = strRecordsedition _
& "<OPTION VALUE='" & RSedition("editions") & "'>" & RSedition("editions") & vbCrLf
RSedition.MoveNext
Loop
Else
strRecordsedition = "<OPTION VALUE='0'>No records found"
End if
Response.Write strRecordsedition
strRecordsedition = ""
RSedition.Close
%>
</SELECT></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<%if blnValidadtracksales = True then %>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" size="2" color="#000080">Specified
Market:</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="specmkt" id="specmkt" size="35" ></font></td>
<td width="28%" height="22" style="border-style: none; border-width: medium" colspan="2">
<p align="left">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>

<%end if%>
<tr>
<td width="93%" height="5" style="border-style: none; border-width: medium" valign="top">
&nbsp;</td>
<td width="56%" colspan="6" height="5" style="border-style: none; border-width: medium">
<b>
<font color="#000080" face="Lucida Sans Unicode" size="1">
N.B If specified market - booking pending approval</font></b></td>
</tr>
<tr>
<td width="93%" height="5" style="border-style: none; border-width: medium" valign="top">
<font size="2" face="Lucida Sans Unicode" color="#000080">Issue Date</font></td>
<td width="56%" colspan="6" height="5" style="border-style: none; border-width: medium">
<font color="#000080" face="Lucida Sans Unicode">
<select name="issuedate" id="issuedate" size="1">

<%
Dim strSQLissue, RSissue, strRecordsissue, currentissue
Set RSissue = Server.CreateObject("ADODB.Recordset")
strSQLissue = "SELECT issuedates FROM issuedate ORDER BY issuedates ASC"
RSissue.Open strSQLissue, DB


If Not RSissue.EOF Then
strRecordsissue = "<OPTION VALUE='0'>"
Do While Not RSissue.EOF
strRecordsissue= strRecordsissue _
& "<OPTION VALUE='" & RSissue("issuedates") & "'>" & RSissue("issuedates") & vbCrLf
RSissue.MoveNext
Loop
Else
strRecordsissue = "<OPTION VALUE='0'>No records found"
End if
Response.Write strRecordsissue
strRecordsissue = ""
RSissue.Close
%>
</SELECT>&nbsp; <b><font size="1">MM/DD/YYYY</font></b></font><font size="2" face="Lucida Sans Unicode" color="#000080"><b> </b></font>
<p>
<font size="1" face="Lucida Sans Unicode" color="#000080"><b>NB. US bookings must be made at least 5
weeks in advance.&nbsp; All others 4 weeks. </b></font>
</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<b>
<font face="Lucida Sans Unicode" color="#000080">
<font size="2">Authorise late booking</font>:</font></b></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="lateauthor" id="lateauthor" size="1">
<option value="Yes">Yes</option>
<option selected value="No">No</option>

</select></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Colour</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="colour" id="colour" size="1">
<option> ----Choose---- </option>
<option> BW
<option> 2C
<option> 3C
<option> 4C
<option> 5C

</select></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Unit Size</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="adsize" id="adsize" size="1">

<%
Dim strSQLunitsize, RSunitsize, strRecordsunitsize, currentunitsize
Set RSunitsize = Server.CreateObject("ADODB.Recordset")
strSQLunitsize = "SELECT DISTINCT unitsizes FROM unitsize"
RSunitsize.Open strSQLunitsize, DB



If Not RSunitsize.EOF Then
strRecordsunitsize = "<OPTION VALUE='0'>"
Do While Not RSunitsize.EOF
strRecordsunitsize = strRecordsunitsize _
& "<OPTION VALUE='" & RSunitsize("unitsizes") & "'>" & RSunitsize("unitsizes") & vbCrLf
RSunitsize.MoveNext
Loop
Else
strRecordsunitsize = "<OPTION VALUE='0'>No records found"
End if
Response.Write strRecordsunitsize
strRecordsunitsize = ""
RSunitsize.Close
%>
</SELECT></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="32" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Other (Please Specify)</font></td>
<td width="14%" colspan="3" height="32" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<textarea cols="25" rows="4" name="unitinfo" id="unitinfo" type="text" size="30"></textarea></font></td>
<td width="19%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="20" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" size="2" color="#000080">
Unit Info</font></td>
<td width="19%" height="20" style="border-style: none; border-width: medium" colspan="3">
<font face="Lucida Sans Unicode" color="#000080">
<textarea cols="25" rows="4" name="S1" id="unitinfo0" type="text" size="30"></textarea></font></td>
<td width="19%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Bleed </font>
</td>
<td width="12%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Yes&nbsp;&nbsp;&nbsp;</font><font face="Lucida Sans Unicode" color="#000080"><input type="radio" name="bleed" value="Yes"></font><font size="2" face="Lucida Sans Unicode" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;
</font> </td>
<td width="7%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">No&nbsp;&nbsp;</font><font face="Lucida Sans Unicode" color="#000080"><input type="radio" name="bleed" value="No"></font></td>
<td width="4%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Copy Split</font></td>
<td width="12%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Yes</font><font face="Lucida Sans Unicode" color="#000080"><input type="radio" name="copysplit" value="Yes"></font><font size="2" face="Lucida Sans Unicode" color="#000080">&nbsp;&nbsp;&nbsp;
</font> </td>
<td width="7%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">No</font><font face="Lucida Sans Unicode" color="#000080"><input type="radio" name="copysplit" value="No"></font><font size="2" face="Lucida Sans Unicode" color="#000080">
</font> </td>

<td width="4%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="68" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Copy Split notes</font></td>
<td width="14%" colspan="3" height="68" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<textarea cols="25" rows="4" name="copysplitnotes" id="copysplitnotes" type="text" size="30"></textarea></font></td>
<td width="19%" height="68" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="68" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="68" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Agency Name</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="agencyname" id="agencyname" size="35" ></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">New Agency</font></td>
<td width="12%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Yes </font>
<font face="Lucida Sans Unicode" color="#000080">
<input type="radio" name="newagency" value="Yes"></font></td>
<td width="7%" height="20" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">No </font>
<font face="Lucida Sans Unicode" color="#000080">
<input type="radio" name="newagency" value="no"></font></td>
<td width="4%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="20" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="47%" colspan="5" rowspan="2" height="67" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">If yes:</font><p><b>
<font size="2" face="Lucida Sans Unicode" color="#000080">Note: booking will not be made if all
details below are not included</font></b></td>
<td width="9%" height="33" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="33" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="9%" height="33" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="33" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Agency Address</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="newagadd" id="newagadd" size="35"></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="32" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Agency Contact Name</font></td>
<td width="14%" colspan="3" height="32" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="newagconname" id="newagconname" size="35"></font></td>
<td width="19%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="32" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Agency Tel Number</font></td>
<td width="14%" colspan="3" height="32" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="newagtelno" id="newagtelno" size="35"></font></td>
<td width="19%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="32" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">New Agency code</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="newagcode" id="newagcode" size="35" ></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="22" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Ad Type</font></td>
<td width="14%" colspan="3" height="22" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="adtype" id="adtype" size="1">
<option>---Choose---</option>
<option>Balance</option>
<option> Paid
<option> Bonus
<option> Barter
<option> HouseAd
<option> Makegood
<option> Ad-as-filler
<option> Sold
<option> Filler
<option>Sold-fast close
</option>

</select></font></td>
<td width="19%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="22" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="26" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Voucher Copy</font></td>
<td width="12%" height="26" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Yes&nbsp; </font>
<font face="Lucida Sans Unicode" color="#000080">
<input type="radio" name="vouchercopy" value="Yes"></font></td>
<td width="7%" height="26" style="border-style: none; border-width: medium">
<font size="2" color="#000080" face="Lucida Sans Unicode">No</font><font face="Lucida Sans Unicode"><font color="#000080">
<input type="radio" name="vouchercopy" value="No"></font><font size="2" color="#000080"> </font>
</font>
</td>
<td width="4%" height="26" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="28%" colspan="2" height="26" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input type="button" name="sendit1" id="sendit0" value="Order Voucher Copy" onclick="window.open('voucherwithbooking.asp','newWin','width=810,height=1000,toolbars=no,scrollbars=yes');"></font></td>
<td width="14%" height="26" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" colspan="3" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="31%" height="19" colspan="4" style="border-style: none; border-width: medium">
<b>
<font size="6" face="Lucida Sans Unicode" color="#000080">Billing Information</font></b></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Billing Currency</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="billingcurr" id="billingcurr" size="1">
<option>---Choose---</option>
<option>Euro</option>
<option>$ US Dollar</option>
<option>£ UK Pound</option>
<option>Rand</option>

</select></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Open Rate (include bleed if appl)</font></td>
<td width="28%" height="19" colspan="3" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="openrate" id="openrate" size="35" type=number></font></td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Position Premium %</font></td>
<td width="28%" height="19" colspan="3" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="ppp" id="ppp" size="35"></font></td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Rate Protection</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Yes </font>
<font face="Lucida Sans Unicode" color="#000080">
<input type="radio" name="rateprotect" value="Yes"></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">No
</font>
<font face="Lucida Sans Unicode" color="#000080">
<input type="radio" name="rateprotect" value="No"></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">If yes, old open rate</font></td>
<td width="28%" height="19" colspan="3" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="oldopenrate" id="oldopenrate" size="35"></font></td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Gross Rate</font></td>
<td width="51%" height="19" colspan="5" style="border-style: none; border-width: medium">
<font color="#000080" face="Lucida Sans Unicode"><input name="grossrate" id="grossrate" size="35" type="number"><input type="button" name="sendit2" id="sendit1" value="Calculate Gross Rate" onclick="grossratecalc()"></font></td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" colspan="3" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" align="center" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" align="center" style="border-style: none; border-width: medium">
<p align="left"><b>
<font size="2" face="Lucida Sans Unicode" color="#000080">Percentage</font></b></td>
<td width="5%" height="19" align="center" style="border-style: none; border-width: medium">
<p align="left">
<b>
<font size="2" face="Lucida Sans Unicode" color="#000080">Value</font></b></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Rate Protection</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="rp" id="rp" size="11" type="number"></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font color="#000080" face="Lucida Sans Unicode">
<input name="rpv" id="rpv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">
Waive Premium</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="wp" id="wp" size="11" type="number" onchange="wpvcalc()" ></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="wpv" id="wpv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Negotiated/ Cash</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="nc" id="nc" size="11" type="number" onchange="ncvcalc()" ></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="ncv" id="ncv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Bonus Ad</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="ba" id="ba" size="11" type="number" onchange="bavcalc()"></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="bav" id="bav" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Position</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="p" id="p" size="11" type="number" onchange="pvcalc()"></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="pv" id="pv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Currency</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="c" id="c" size="11" type="number" onchange="cvcalc()"></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="cv" id="cv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">DVD</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="dvd" id="dvd" size="11" type="number" onchange="dvdvcalc()" ></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="dvdv" id="dvdv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Frequency</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="f" id="f" size="11" type="number" onchange="fvcalc()"></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="fv" id="fv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Filler</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="fi" id="fi" size="11" type="number" onchange="fivcalc()"></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="fiv" id="fiv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Other Discount</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="od" id="od" size="11" type="number" onchange="odvcalc()"></font></td>
<td width="5%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<input name="odv" id="odv" size="11" ></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Net Prior agency Commission</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="net" id="net" size="11" type="number"></font></td>
<td width="32%" height="19" style="border-style: none; border-width: medium" colspan="3">
<font color="#000080" face="Lucida Sans Unicode">
<input type="button" name="sendit3" id="sendit2" value="Calculate Net (prior A/C)" onclick="netcalc()"></font></td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Agency commission percentage</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="agcomper" id="agcomper" size="11" type="number" ></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Net Net (invoice amt)</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="netnet" id="netnet" size="11" ></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">
<font color="#000080" face="Lucida Sans Unicode">
<input type="button" name="sendit4" id="sendit3" value="Calculate Net Net" onclick="netnetcalc()"></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Production Premium ($US)</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="prodprem" id="prodprem" size="11"></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Total Net Revenue on this booking</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080"><input name="ttlnetrev" id="ttlnetrev" size="11" type="number"></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">
<font color="#000080" face="Lucida Sans Unicode">
<input type="button" name="sendit5" id="sendit4" value="Calculate Ttl Net " onclick="prodpremcalc()"></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Office</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font color="#000080" face="Lucida Sans Unicode"><select name="office" id="office" size="1">
<option> ----Choose---- </option>
<option> London
<option> Paris
<option> Dusseldorf
<option> Geneva
<option> Singapore
<option> hong Kong
<option> Tokyo
<option> NY
<option> Thailand - Rep
<option> South Africa
<option> Korea - Rep
</option>
</select></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Sales person</font></td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<select name="salesperson" id="salesperson" size="1">

<%
Dim strSQLsalesperson, RSsalesperson, strRecordssalesperson, currentsalesperson
Set RSsalesperson = Server.CreateObject("ADODB.Recordset")
strSQLsalesperson = "SELECT salesperson FROM salesperson ORDER BY salesperson ASC;"
RSsalesperson.Open strSQLsalesperson, DB

If Not RSsalesperson.EOF Then
strRecordssalesperson = "<OPTION VALUE='0'>"
Do While Not RSsalesperson.EOF
strRecordssalesperson = strRecordssalesperson _
& "<OPTION VALUE='" & RSsalesperson("salesperson") & "'>" & RSsalesperson("salesperson") & vbCrLf
RSsalesperson.MoveNext
Loop
Else
strRecordssalesperson = "<OPTION VALUE='0'>No records found"
End if
Response.Write strRecordssalesperson
strRecordssalesperson = ""
RSsalesperson.Close
%>
</SELECT></font></td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">
&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Positioning&nbsp; (<b>No new requests
accepted</b>)</font></td>
<td width="9%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<textarea cols="25" rows="4" name="positioning" id="positioning" type="text" size="35"></textarea></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font size="2" face="Lucida Sans Unicode" color="#000080">Additional Information</font></td>
<td width="9%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080">
<textarea cols="25" rows="4" name="addinfo" id="addinfo" type="text" size="35"></textarea></font></td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="93%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="12%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="7%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="4%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="19%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="9%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
<td width="14%" height="19" style="border-style: none; border-width: medium">&nbsp;</td>
</tr>
<tr>
<td width="29%" height="19" colspan="2" style="border-style: none; border-width: medium">
<font face="Lucida Sans Unicode" color="#000080" size="2">Last Amended By:
 
*boggles at the long code*

simplest way is to make a form value recycler, nothing too complicated, uses a bunch of variables, so not to be used in heavy traffic areas, as to it may cause performance issues. this is a little more "complicated" logically, but much easier than having to write hoards of repeat variable assignments or <input value="<%=request(blah)%>"...

first is to make a dual purpose form so that you can populate the form via db OR value recycling, highly recommended to use a pretty specific naming format, so as not to complicate the variables elsewhere.

but, the heart of this is use of the Execute function that will let you create your variables and values on the fly.

if you're populating the form from a DB then you'd need to use the prefix and fieldnames to help with easing the handling say a field name is "Email"

Naming convention : used for both db side and form side.

Code:
NamingPrefix="frmval_"

Use a loop through for each field in the recordset to assign values to variables, then all your field data values are in floating variables that you can't see

Code:
if not rs.eof then
  for each field in rs.fields
    execute(NamingPrefix & field.name & "=" & rs(Field.Name)) 
  Next
end if
please note no extra double quotes, the request values and the RS values are already "variables" and set to proper datatype ( number/string )

now for the form after posting ( namely changing a parent dropdown value for a dependant drop down )

Code:
for each element in request.form ' or querystring
  Execute(NamingPrefix & element & "=" & Request.form(element))
next
( this will create frmval_Email="user@domain.com" )

then all your form element values are in floating variables that you can't see, then in the form :

Code:
<input type="text" name="Email" value="<%=Server.HTMLEncode(frmval_Email)%>">
The Server.HTMLEncode is to avoid breaking the HTML with string values that perchance may have quotes or other things that might mess things up

if this is still confusing, it makes a lot more sense when put into a sample environment, i'd suggest 2 forms, one empty, the other with the population code above, leave out the DB side at first, it'll just confuse and complicate things.

use the first page to post to the second, and the second posts to itself, and update the fields to see how it works.

if you'd like more explaination or questions answered about this, feel free to ask.

 
HI, sorry for the previous long (and wrong) code - I have put the correct sample code below.

Just to further prove my apparent muppet-ness, can you show me how I would use your suggestion to maintain any text entered into the 3 text input fields. Many thanks for your help.

Code:
<%@ Language = VBScript %>
<%Option Explicit%>
<%Response.Buffer = True%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<!-- #INCLUDE FILE="../../../../Scripts/GetDatabase.asp" -->
<%
dim  strDataPath, strConnectString, objConnection, stredition, stredlist, strCity, objRS, strSelected

stredlist = Request.Form("edlist")
stredition = Request.Form("edition")

DBConnect("adtracking.mdb")

'set connection strings for entire application



sub makeedlist()
Dim strSQLedlist, RSedlist

Dim strRecordsproduct

Set RSedlist = Server.CreateObject("ADODB.Recordset")

strSQLedlist = "Select edlist from edlist order by edlist_id"
RSedlist.Open strSQLedlist, DB
	
	Response.Write("<option></option>" & VBCRLF )
	do while not RSedlist.EOF
		if RSedlist("edlist") = stredlist then
			strSelected = " Selected "
		else
			strSelected = ""
		end if
		Response.Write("<option" & strSelected & ">" & RSedlist("edlist") & "</option>" & VBCRLF )
		RSedlist.MoveNext
	loop
	RSedlist.Close
	set RSedlist=Nothing
end sub



sub makeedition()
Dim strSQLedition, RSedition
Set RSedition = Server.CreateObject("ADODB.Recordset")

strSQLedition = "Select editions from editions WHERE usedfor = '" & stredlist & "'order by unique"
RSedition.Open strSQLedition, DB
		if RSedition.eof then
			Response.Write("<option>No editions Found</option>")
		else
			Response.Write("<option>Select Edition Now</option>" & VBCRLF )
			do while not RSedition.EOF
				if RSedition("editions") = stredition then
					strSelected = " Selected "
				else
					strSelected = ""
				end if
				Response.Write("<option" & strSelected & ">" & RSedition("editions") & "</option>" & VBCRLF )
				RSedition.MoveNext
			loop
		end if
		RSedition.Close
		set RSedition=Nothing
	
end sub
%>

<SCRIPT LANGUAGE=javascript>
<!--

function submitedlist(){
	var objForm = document.forms[0];
	var textfield= objForm.elements['text1'];
	objForm.elements['edition'].selectedIndex = 0;
	
	objForm.submit()
	objForm.elements['text1'] = textfield;
}
function submitEdition(){
	var objForm = document.forms[0];
	objForm.elements['edlist'].selectedIndex = 0;
	objForm.submit();
}

function submitForm(){
	var objForm = document.forms[0];
	objForm.action = "addbooking.asp"
	return true;
}
//-->
</SCRIPT>

</HEAD>
<BODY>
<FORM action="" method=POST id=form1 name=form1 onSubmit="return submitForm()">
<SELECT  name="edlist" onChange="submitedlist()">
	<%call  makeedlist%>
</SELECT><br>
<SELECT  name="edition">
	<%call makeedition%>
</SELECT><br>
<INPUT type="text" id=text1 name=text1>
<INPUT type="text" id=text2 name=text2>
<INPUT type="text" id=text3 name=text3>
<p><INPUT type="submit" value="Submit" id=submit1 name=submit1></p>
</FORM>
</BODY>


</HTML>
 
It looks like you are submitting the form back to itself after the first dropdown is selected. The est way i could see to preserve the values would be to simply add a value="<%=Request.Form("thisFieldname")%>" attribute to all your non-dropdown inputs:
Code:
<INPUT type="text" id=text1 name=text1 [highlight]value="<%=Request.Form("text1")%>"[/highlight]>
<INPUT type="text" id=text2 name=text2 [highlight]value="<%=Request.Form("text2")%>"[/highlight]>
<INPUT type="text" id=text3 name=text3 [highlight]value="<%=Request.Form("text3")%>"[/highlight]>

The first time around those Form values will be empty, so your text boxes will be empty. If they fill them out then go back to select an item fro the dropdown, the page wil reload and populate the text inputs with the values that was submitted for them, basically saving them between page loads.

-T

[sub]01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111[/sub]
The never-completed website:
 
Ok, I now have, what I'm sure is simple, slight issue when I have finished entering the data.

Because i run some validation checks to ensure the field are entered correctly, I cannot do a straight submit afterwards. the form can only be posted if all criteria are met. extracts from the code are below .....

form definition
Code:
<form action="" method="post" name="theForm" id="theForm" onSubmit="return submitForm()">

submit button :
Code:
<input type="button" name="sendit" id="sendit" value="Send" onclick="checkfields()">

validation code followed by submit function :
Code:
function checkfields(){


	var theStr = ''
	var now = new Date()
	

	var then = new Date(document.theForm.issuedate.value);
	var selectedEdition = document.theForm.edition.value;
	var gap = Math.round((then-now)/864e5);
	var USEdition=selectedEdition.indexOf('- US');

	if(gap <28 && document.theForm.lateauthor.value == 'No' && USEdition <0) theStr += 'This Non US booking is late, if you wish this to be passed to the Business Office for approval please choose "Yes" to authorise late booking, and re-send.\n' + gap
	if(gap <35 && document.theForm.lateauthor.value == 'No' && USEdition >0) theStr += 'This US booking is late, if you wish this to be passed to the Business Office for approval please choose "Yes" to authorise late booking, and re-send.\n' + gap
		
	if(document.theForm.advertiser.value == '') theStr += 'Advertiser\n'
	if(document.theForm.issuedate.options[document.theForm.issuedate.selectedIndex].index == 0) theStr += 'Issue Date\n'
	if(document.theForm.edition.options[document.theForm.edition.selectedIndex].index == 0) theStr += 'Edition\n'
	if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagadd.value == '') theStr += 'New Agency Address\n'
	if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagconname.value == '') theStr += 'New Agency Contact Name\n'
	if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagtelno.value == '') theStr += 'New Agency Telephone Number\n'
	if(document.theForm.newagency.options[document.theForm.newagency.selectedIndex].index == 1 && document.theForm.newagcode.value == '') theStr += 'New Agency Code\n'
	
	if(document.theForm.bleed.value == '') theStr += 'Bleed\n'
		if(theStr == '') document.s
			else alert('The following data is invalid:\n'+theStr)
	}

function submitForm(){
	var objForm = document.forms[0];
	objForm.action = "addbooking.asp"
	return true;
}

At present, when all the criteria is met the data isn't sent to the addbooking.asp page. All that happens is that the current page/form is reloaded.

Any ideas what I've done wrong ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top