Thanks so much for the reply! Yes, I had tried that (and just did again), but in still does not work in IE. Here is the form code:
Code:
<form name="frm" method="post" action="<?php $_SERVER['PHP_SELF'];?>" onSubmit="return valid_form(this);">
.
.
.
<select name="BirthDateMonth">
<?php
if($BirthDateMonth != ""){
?>
<option selected><?=$BirthDateMonth;?></option>
<?php
}
else {
echo"<option>--</option>";
}
?>
<?php
for($i=1; $i <= 12; $i++){
echo"<option>$i</option>";
}
?>
</select>
.
.
.
<input type="submit" value="Next Step" name="submitReg">
</form>
The javascript is in an include file, which is included inside a header include file by the line:
Code:
<script language="javascript" src="js/registration.js"></script>
And the js function is:
Code:
function valid_form(frm){
message = "";
if(frm.BLName.value == "" || frm.BLName.value == " "){
message = "Please enter your Birth Last Name. ";
frm.BLName.focus();
}
alert("month: " + document.forms[0].BirthDateMonth.options[document.forms[0].BirthDateMonth.selectedIndex].value);
.
.
.
}
The dots indicate other code I haven't shown but is most likely not relative. The thing is it WORKS in Firefox. Why not in IE is what I can't figure out. :-P