hughesmi
02-01-2005, 04:54 PM
Can anyone help.
I have a html form that has 3 fields - "Fee", "Advanced Fee" and "Balance Due"
Can someone help me work out a bit of JS that when the "Fee" in entered in a whole number it will subtract the "Advanced Fee" to leave the "Balance Due" but can this be done in automatically.
Here is my form.
<b><font size="2" face="Arial">Payment Info.</font></b>
<form method="POST" action="ad.asp">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="572" height="23" id="AutoNumber3">
<tr>
<td width="180" height="5" align="right" bgcolor="#336699"><b><font size="2" face="Arial" color="#FFFFFF">Fee
:</font></b></td>
<td width="386" height="5"><font size="2" face="Arial">
<b> £<input type="text" name="Fee" size="20" tabindex="15"></b></font></td>
</tr>
<tr>
<td width="180" height="11" align="right" bgcolor="#336699"><b><font size="2" face="Arial" color="#FFFFFF">Advanced
Fee :</font></b></td>
<td width="386" height="11"><font size="2" face="Arial">
<b> £<input type="text" name="Advanced_Fee" size="20" tabindex="16"></b></font></td>
</tr>
<tr>
<td width="180" height="20" align="right" bgcolor="#336699"><b><font size="2" face="Arial" color="#FFFFFF">Balance
Due :</font></b></td>
<td width="386" height="20"><font size="2" face="Arial">
<b> £<input type="text" name="Balance_Due" size="20" tabindex="17">
</b></font></td>
</tr>
<tr>
<td width="180" height="18" align="right" bgcolor="#336699">
<font size="2" face="Arial" color="#FFFFFF">
<b>When:</b></font></td>
<td width="386" height="18"><font face="Arial" size="2"><b> £</b><input type="text" name="Balance_Due_When" size="7" style="text-transform: uppercase" tabindex="18">i.e OTN = <b>O</b>n <b>T</b>he<b> N</b>ight</font></td>
</tr>
</table>
</form>
I have a html form that has 3 fields - "Fee", "Advanced Fee" and "Balance Due"
Can someone help me work out a bit of JS that when the "Fee" in entered in a whole number it will subtract the "Advanced Fee" to leave the "Balance Due" but can this be done in automatically.
Here is my form.
<b><font size="2" face="Arial">Payment Info.</font></b>
<form method="POST" action="ad.asp">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="572" height="23" id="AutoNumber3">
<tr>
<td width="180" height="5" align="right" bgcolor="#336699"><b><font size="2" face="Arial" color="#FFFFFF">Fee
:</font></b></td>
<td width="386" height="5"><font size="2" face="Arial">
<b> £<input type="text" name="Fee" size="20" tabindex="15"></b></font></td>
</tr>
<tr>
<td width="180" height="11" align="right" bgcolor="#336699"><b><font size="2" face="Arial" color="#FFFFFF">Advanced
Fee :</font></b></td>
<td width="386" height="11"><font size="2" face="Arial">
<b> £<input type="text" name="Advanced_Fee" size="20" tabindex="16"></b></font></td>
</tr>
<tr>
<td width="180" height="20" align="right" bgcolor="#336699"><b><font size="2" face="Arial" color="#FFFFFF">Balance
Due :</font></b></td>
<td width="386" height="20"><font size="2" face="Arial">
<b> £<input type="text" name="Balance_Due" size="20" tabindex="17">
</b></font></td>
</tr>
<tr>
<td width="180" height="18" align="right" bgcolor="#336699">
<font size="2" face="Arial" color="#FFFFFF">
<b>When:</b></font></td>
<td width="386" height="18"><font face="Arial" size="2"><b> £</b><input type="text" name="Balance_Due_When" size="7" style="text-transform: uppercase" tabindex="18">i.e OTN = <b>O</b>n <b>T</b>he<b> N</b>ight</font></td>
</tr>
</table>
</form>