I am pulling out my hair here, so I really hope someone can help me. I have a PHP page that has Javascript validation. I am trying to validate a form select box. It works in Firefox but not in IE7. I have tried all sorts of things, but here is an alert that works in FF not IE, and if someone can help me with it, I can get the rest. Thanking you all in advance!
Code:
//the js part
function valid_form(frm){
alert("month: " + frm.BirthDateMonth.options[frm.BirthDateMonth.selectedIndex].value);
}
//this is from the php form:
<select name="BirthDateMonth">
<?php
if($BirthDateMonth != ""){
?>
<option selected><?=$BirthDateMonth;?></option>
<?php
}
else {
echo"<option>--</option>";
}
for($i=1; $i <= 12; $i++){
echo"<option>$i</option>";
}
?>
</select>