<html>
<body> DOES NOT BELONG HERE
<head>
<font face="Candara"> DOES NOT BELONG HERE AND IS DEPRECIATED
<title>Selection Validator</title>
<script type>="text/javascript" language="Javascript"> PLEASE CORRECT THIS IT IS TOTALLY WRONG
function validateChoice(genderForm) {
genderOption = -1
for (i=0; i<genderForm.genderChoice.length; i++) {
if (genderForm.genderChoice[i].checked) {
genderOption = i
alert ("You are a " + genderForm.genderChoice[i].value)
}
}
if (genderOption ==-1 { MISSING A CLOSING )
alert ("You must choose either Male or Female.")
return false
}
return true
}
</script>
</head>
</font> DOES NOT BELONG
</body>
<nonscript>
Javascript not detected! This page will not work properly.
</nonscript> REMOVE THIS IT DOES NOT WORK CORRECTLY
<form name ="myForm" onSubmit="return validateChoice(this)"> AS julien SAID, NEEDS AN METHOD ALSO name ="myForm" S/B ID ="myForm" ALSO NEEDS AN ACTION
<p>Select your gender:
<input type="radio" name="genderChoice" value="Male" /> Male
<input type="radio" name="genderChoice" value="Male" /> Female value="Male" S/B value="female"
<input type="submit" value="Validate" />
</p>
</form>
</html>
Fix code and check again.
Last edited by sunfighter; 01-10-2013 at 04:47 PM..