I'm having some trouble here...
The script is supposed to give an alert when no radiobuttons are selected, and it does do that, but it also gives an alert when a radio button is selected...why??
I have not failed; I merely found 100,000 different ways of not succeding...
The script is supposed to give an alert when no radiobuttons are selected, and it does do that, but it also gives an alert when a radio button is selected...why??
Code:
<html>
<head>
<script>
function YourChoice() {
if(!form1.choice.checked) {
alert("please choose one");
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="mailto:mmm@aol.com" onSubmit="return YourChoice();">
<input type="radio" name="choice" value="Tes">
<input type="radio" name="choice" value="Jes">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>