I want to approve a user's form (i.e. send if off for processing) if they meet criteria 1 & 2 or they meet criteria 1 & 3 or they meet criteria 1 & 4.
In each case the answers are provided by radio buttons, the first option of which is YES and the second of which is NO.
I'm getting a bit confused with my brackets I think.
Here's the code....
if((!document.details.k_Permanent_option_amendments_required[0].checked &&
!document.details.m_Member_of_Systems_Development0].checked) || (!document.details.j_Permanent_registry_changes_required[0] && !document.details.m_Member_of_Systems_Development[0].checked) || (!document.details.l_Member_of_official_help_desk[0] &&
!document.details.m_Member_of_Systems_Development[0].checked))
{
alert('Fail : You don't meet the Criteria');
return false;
}
Hope you can help.
Thanks.
JT
In each case the answers are provided by radio buttons, the first option of which is YES and the second of which is NO.
I'm getting a bit confused with my brackets I think.
Here's the code....
if((!document.details.k_Permanent_option_amendments_required[0].checked &&
!document.details.m_Member_of_Systems_Development0].checked) || (!document.details.j_Permanent_registry_changes_required[0] && !document.details.m_Member_of_Systems_Development[0].checked) || (!document.details.l_Member_of_official_help_desk[0] &&
!document.details.m_Member_of_Systems_Development[0].checked))
{
alert('Fail : You don't meet the Criteria');
return false;
}
Hope you can help.
Thanks.
JT