I am trying to prevent submission of a form if either or both of 2 functions return false. I've tried calling the functions in my form this way:

<form action="tuition-calculator.php" name="orderform" id="tuition-schedule" method="post" onsubmit="return (tuesThurs() && setTuition())">, but it doesn't stop the submission, even if the results are false.

So...now I've tried this:
(in header)

<script type="text/javascript">
function formValidation(myForm)
{
var result = tuesThurs(myForm);
var result2 = setTuition(myForm);
results = result && result2;
return results;
}
</script>

(in body)

<form action="tuition-calculator.php" name="orderform" method="post" onsubmit="return formValidation(this)">

If the values are "false" for both functions, the proper alerts appear and the submission doesn't happen. If I change my entries so that tuesThurs returns a "true" but setTuition returns a false, the alert for setTuition appears, but the submission goes through anyway. I do not want it to be submitted until both functions are true.

Any suggestions?