G
Garry Jones
I want to trigger an alert if three conditons are met.
How do I nest if statements? I tried this, but it triggered the alert if
just one of the three conditions was met.
function checkform ( form )
{
if (form.blue.value == "yes") {
if (form.green.value == "yes") {
if (form.yellow.value == "yes") {
alert( "You can only choose two items for this option");
form.dtet1.focus();
return false ;
}
}
}
return true ;
}
Any help greatly appreciated
Garry Jones
Sweden
How do I nest if statements? I tried this, but it triggered the alert if
just one of the three conditions was met.
function checkform ( form )
{
if (form.blue.value == "yes") {
if (form.green.value == "yes") {
if (form.yellow.value == "yes") {
alert( "You can only choose two items for this option");
form.dtet1.focus();
return false ;
}
}
}
return true ;
}
Any help greatly appreciated
Garry Jones
Sweden