Click to See Complete Forum and Search --> : Simple Validation problem


nateobot
11-04-2003, 04:58 PM
Should be simple for anyone not named Nate.

I have two drop down boxes. One filled with Months, the other filled with Years. I simply want to verify that they did not select the default value of "Select Month" the value of this option is 0.

I put in the following javascript:


<script language="JavaScript">
<!--
function validate(form){
if (form.month.value=="0");{
alert("Must enter a valid month");
return false;}
}
// -->
</script>


However it seems that whatever month I select it gives me the error message. I feel like a complete moron for something that should be so simple. :bag:

nateobot
11-04-2003, 05:13 PM
I knew it was easy. Should have posted 30 minutes ago to save myself the agony.