PDA

View Full Version : Javascript syntax help


ngaisteve1
02-25-2004, 04:28 AM
I wonder if this syntax correct coz doesn't seem work

<script language="javascript" type="text/javascript">
if (myform.qty_out_fr.value > (myform.qty_fr.value - myform.qty_outstanding_fr.value))
alert("Quantity delivered should be less than or equal to quantity ordered. Try again");
myform.qty_out_fr.focus()
return false;}
</script>

Kalessin
02-25-2004, 05:16 AM
Well, you've got a closing brace, but not an opening one...

<script language="javascript" type="text/javascript">
if (myform.qty_out_fr.value > (myform.qty_fr.value - myform.qty_outstanding_fr.value)) {
alert("Quantity delivered should be less than or equal to quantity ordered. Try again");
myform.qty_out_fr.focus()
return false;
}
</script>
If this doesn't work, I'd like to know why :)

ngaisteve1
02-25-2004, 09:09 PM
Yeah. It's true. Thanks.