I have a script that is supposed to validate groups of radio buttons. It works when comparing one group of buttons, but does not work when more than one group is involved.
For example:
this one works:
but this one does not:
How can I make it so i can compare the value of the field Name together with the field Price?
thanks for your help.
For example:
this one works:
Code:
function checkform()
{
if (!document.form1.Price[0].checked &&
!document.form1.Price[1].checked &&
!document.form1.Price[2].checked) {
// no radio button is selected
alert('Please select the destination country for your 3 Issue Subscription!');
return false;
}
return true;
}
but this one does not:
Code:
function checkform()
{
if (document.form1.Name[0].checked &&
!document.form1.Price[0].checked &&
!document.form1.Price[1].checked &&
!document.form1.Price[2].checked) {
// no radio button is selected
alert('Please select the destination country for your 3 Issue Subscription!');
return false;
}
return true;
}
How can I make it so i can compare the value of the field Name together with the field Price?
thanks for your help.