LuigiX
11-26-2003, 11:36 PM
Hi
I have form with a series of combo boxes. A total for each combo box must be calculated based on the selection made for that item. Each selection will have a value that will be hard coded eg small computer will be $1,000, large computer will be $3,000 and this value must be displayed in the item total field depending on the selection made. For example if a small computer is chosen the value displayed in the totComputer field will be $1,000
A grand total must be calculated by summing all the totals.
I've attached a sample form
Many thanks for your help
Cheers
Luigi
<html>
<head>
<title>New Page 1</title>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="307">
<tr>
<td width="71">computer</td>
<td width="161"><select size="1" name="computer">
<option>small</option>
<option>medium</option>
<option>large</option>
</select></td>
<td width="196"><input type="text" name="totComputer" size="20"></td>
</tr>
<tr>
<td width="71">desk</td>
<td width="161"><select size="1" name="Desk">
<option>wood</option>
<option>glass top</option>
<option>4 drawer</option>
</select></td>
<td width="196"><input type="text" name="totDesk" size="20"></td>
</tr>
<tr>
<td width="71">chair</td>
<td width="161"><select size="1" name="Chair">
<option>highback</option>
<option>lowrise</option>
</select></td>
<td width="196"><input type="text" name="totChair" size="20"></td>
</tr>
<tr>
<td width="71"></td>
<td width="161">
<p align="right">total</td>
<td width="196"><input type="text" name="grandTotal" size="20"></td>
</tr>
</table>
</div>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
I have form with a series of combo boxes. A total for each combo box must be calculated based on the selection made for that item. Each selection will have a value that will be hard coded eg small computer will be $1,000, large computer will be $3,000 and this value must be displayed in the item total field depending on the selection made. For example if a small computer is chosen the value displayed in the totComputer field will be $1,000
A grand total must be calculated by summing all the totals.
I've attached a sample form
Many thanks for your help
Cheers
Luigi
<html>
<head>
<title>New Page 1</title>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="307">
<tr>
<td width="71">computer</td>
<td width="161"><select size="1" name="computer">
<option>small</option>
<option>medium</option>
<option>large</option>
</select></td>
<td width="196"><input type="text" name="totComputer" size="20"></td>
</tr>
<tr>
<td width="71">desk</td>
<td width="161"><select size="1" name="Desk">
<option>wood</option>
<option>glass top</option>
<option>4 drawer</option>
</select></td>
<td width="196"><input type="text" name="totDesk" size="20"></td>
</tr>
<tr>
<td width="71">chair</td>
<td width="161"><select size="1" name="Chair">
<option>highback</option>
<option>lowrise</option>
</select></td>
<td width="196"><input type="text" name="totChair" size="20"></td>
</tr>
<tr>
<td width="71"></td>
<td width="161">
<p align="right">total</td>
<td width="196"><input type="text" name="grandTotal" size="20"></td>
</tr>
</table>
</div>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>