error on page
Hello everyone! I have a form where you enter the number of appliances you need, and the total amount (one appliance is $185, each additional appliance is $85). I want to display the predicted cost in the amount input box when the user selects their number of appliances. My script looks like this:
and my form looks like this:
I've also tried using document.contract.Quantity.selectedIndex.v alue in the operation as well, which didn't work either. It's frustrating because I know the solution is probably really simple. Please help!
<--!funtion cost()
{
total==125+document.contract.Quantity.selectedIndex*85;
document.contract.Amount.value=total;
}//->
and my form looks like this:
<form name="contract">
Quantity of unit(s):
<select name="Quantity" onBlur="cost()">1
<option value="0">1</option>
<option value="1">2</option>
<option value="2">3</option>
<option value="3">4</option>
<option value="4">>4</option>
</select></td>
Amount Due:
$<input name="Amount" type="text" size="3">.00
</form>
I've also tried using document.contract.Quantity.selectedIndex.v
