Hi! I hope someone can help me:
I have 3 groups of radio buttons (each group has more than 3 choices)
A - full day course (3 choices)
B - half day morning (4 choices)
C - half day afternoon (4 choices)
I need to
1) alert users only when any A and any C are BOTH selected (schedule conflict)
2) alert users only when any B and any C are BOTH selected (qualifies for discount)
I've tried
function validate(form1) {
if(document.form1.workshop[0].checked)
{
alert('You must choose an option, and complete the form field');
}
}
This works, but only when I click on the first choice of group A.
So I tried to create a variation to validate when A and C are both selected:
if(document.form1.workshop[0].checked && if(document.form1.halfday[0].checked)
but it didn't work...
plus, I don't want to detect just workshop[0], but any of the 3 choices (workshop0-2)
any help will be greatly appreciated!!!
Thanks a lot!!!!
YC
I have 3 groups of radio buttons (each group has more than 3 choices)
A - full day course (3 choices)
B - half day morning (4 choices)
C - half day afternoon (4 choices)
I need to
1) alert users only when any A and any C are BOTH selected (schedule conflict)
2) alert users only when any B and any C are BOTH selected (qualifies for discount)
I've tried
function validate(form1) {
if(document.form1.workshop[0].checked)
{
alert('You must choose an option, and complete the form field');
}
}
This works, but only when I click on the first choice of group A.
So I tried to create a variation to validate when A and C are both selected:
if(document.form1.workshop[0].checked && if(document.form1.halfday[0].checked)
but it didn't work...
plus, I don't want to detect just workshop[0], but any of the 3 choices (workshop0-2)
any help will be greatly appreciated!!!
Thanks a lot!!!!
YC
Comment