Form Validation Problems
I am checking to make sure that two drop down menus in a form have an option chosen before the form is submitted. I can accomplish this fine in IE, but Netscape still keeps submitting the form. Here is the code
<script language="javascript">
function chkData() {
if(document.productform.market.value == "") {
alert("You must choose a market.");
return false;
}
if(document.productform.prodtype.value == "") {
alert("You must choose a product type.");
return false;
}
else
return true;
}
</script>
onsubmit="return chkData()
can anyone tell me how to fix this so that netscape checks it also? Thanks
RC posted this at 19:11 — 2nd February 2000.
They have: 89 posts
Joined: Sep 1999
nevermind, figure it out
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.