Please, help me. I know very little Javascript. ![[sadeyes] [sadeyes] [sadeyes]](/data/assets/smilies/sadeyes.gif)
I want to validate a group of radio buttons and if the NO (position 1) is selected then the Selection box 4 has to be answered also. Here is my code, it works in IE, but NN.
Thanks ahead for your help.
if (!(frmForm.q3[0].checked || frmForm.q3[1].checked)){
N=frmForm.q3.value;
window.alert("Please answer question 3"
;
return false;
}
if (frmForm.q3[1].checked && z4.value == "choose one"
{
alert("Please Answer Question 4"
;
z4.focus();
return false;
}
if (frmForm.q3[1].checked && z4.value == "Other" && document.frmForm.q4.value==""
{
alert("Please Answer specify 'Other' in Question 4"
;
z4.focus();
return false;
}
![[lipstick2] [lipstick2] [lipstick2]](/data/assets/smilies/lipstick2.gif)
![[sadeyes] [sadeyes] [sadeyes]](/data/assets/smilies/sadeyes.gif)
I want to validate a group of radio buttons and if the NO (position 1) is selected then the Selection box 4 has to be answered also. Here is my code, it works in IE, but NN.
Thanks ahead for your help.
if (!(frmForm.q3[0].checked || frmForm.q3[1].checked)){
N=frmForm.q3.value;
window.alert("Please answer question 3"
return false;
}
if (frmForm.q3[1].checked && z4.value == "choose one"
alert("Please Answer Question 4"
z4.focus();
return false;
}
if (frmForm.q3[1].checked && z4.value == "Other" && document.frmForm.q4.value==""
alert("Please Answer specify 'Other' in Question 4"
z4.focus();
return false;
}
![[lipstick2] [lipstick2] [lipstick2]](/data/assets/smilies/lipstick2.gif)