Hi,
I am trying to force a value in a text box from selecting a combo box but for some reason I cant get the IF statement working.
I want to be able to select a value from the combo box and when doing so it will put a number value in the text box.
<script Language="JavaScript">
<!--
function compute(form)
{
if (baskets=="toast")
{
document.basketorder.price.value = 40;
}
}
//-->
</script>
<body>
<FORM METHOD="POST" ACTION="http://mailgate.server-mail.com/cgi-bin/mailgate" name="basketorder">
<select name="baskets" onClick="compute(this.form)">
<option value="">- Select -</option>
<option value="toast">A Toast</option>
<option value="simple">Simple Pleasures</option>
<option value="fine">Fine Fare</option>
<option value="party">Party Time</option>
</select>
<input name="price" type="text">
</form>
Thanks for your help with this.
Frogger



Reply With Quote

Bookmarks