The script below works only in IE and not in mozilla.. can anyone help me out !!
I think the problem is due to [B]event.returnValue=false;
[QUOTE]
<HTML>
<HEAD>
<TITLE>Validating Large Radio Fields</TITLE>
</HEAD>
<BODY>
<FORM ID=”mainform” ACTION=”
<BR>
<INPUT TYPE=”RADIO” NAME=”IceCream” VALUE=”Vanilla”>Vanilla
<INPUT TYPE=”RADIO” NAME=”IceCream” VALUE=”Choc”>Chocolate
<INPUT TYPE=”RADIO” NAME=”IceCream” VALUE=”Straw”>Strawberry
<INPUT TYPE=”RADIO” NAME=”IceCream” VALUE=”RaspR”>Raspberry Ripple
<INPUT TYPE=”RADIO” NAME=”IceCream” VALUE=”Mint”>Mint
<BR>
<INPUT TYPE=”SUBMIT”>
</FORM>
<SCRIPT>
<!–
function validate() {
ICOK=false;
for (ic=0;ic<5;ic++) {
if (document.getElementById(“mainform”).IceCream[ic].checked) ICOK=true;
}
if (!ICOK) {
alert(‘Your favorite Ice Cream flavor is a required field. Please try again.’);
event.returnValue=false;
}
}
// WORKS IN IE not in MOZILLA
–>
</SCRIPT>
</BODY>
</HTML>