TheCandyman
Technical User
I keep getting an error while validating my form. I can't see what i have missed.
the names are correct
the names are correct
Code:
<script type="text/javascript" language="JavaScript">
function validateForm() {
with (document.MyForm) {
var alertMsg = "Please fill in the following before searching:\n";
if ((Specialty.selectedIndex==0 )||(Specialty2.selectedIndex==0)) {alertMsg += "\n- Speciality";}
if (city.selectedIndex==0 && zip.value=="")||(city2.selectedIndex==0 && zip2.value=="") {alertMsg += "\n- City or Zip";}[COLOR=#ff0000]Error This Line[/color]
if (alertMsg != "Please fill in the following before searching:\n") {
alert(alertMsg);
return false;
} else {
return true;
} } }
</script>