First thing is remove the
onclick="pricecheck()" from the form and place it on the submit button.
- Code: Select all
<input type="image" src="webimages/icons/crtadd.gif" onclick="pricecheck()"
border=0 align="absbottom" name="listadd" width="89" height="21">
Next change the js to this:
- Code: Select all
<script language="javascript">
function pricecheck()
{
if (document.order.ADDITIONALINFO.selectedIndex.value = 0){
document.order.PRICE.value = 12.90;
}
else if (document.order.ADDITIONALINFO.selectedIndex.value = 1){
document.order.PRICE.value = 14.90;
}
else {
document.order.PRICE.value = 15.90;
}
}
</script>
And also close your options tag:
<select name=ADDITIONALINFO>
<option value="25 x 25"> 25 x 25
</option><option value="35 x 35"> 35 x 35
</option><option value="45 x 45">45 x 45</option> </select>