I've five variables in a form, for simplicity I named them A, B, C, D and E. In order to submit the form (A or (B or C)) and (D or E) must have a value (I hope it's clear :P). I've tried with
if ((A == "" || (B == "" || C == "")) && (D == "" || E == "")) {
alert ("Error!");
} else {
form.submit();
}
But it doesn't work in every case. For example, if A, B and C have a value, the form is submitted even if neither D or E have values. Thank you for the help!
{A,B,C,D,E.