I have number of conditions i'd like to check before submitting a form so I've created:
$("Step2_UpdateCartForm").submit(function () {
if (!procssingEmails) {
return true;
} else {
return false;
}
And I have a number of events that could result in a form submission so i have something like:
function fireUpdateCart() {
if (isUpdateCartPending) {
clearCartOptionDefaultValues();
$("#Step2_UpdateCartForm").submit();
}
}
in a few different places. I'm expecting the above statement to send processing to that first code block but instead, the form is being submitted.
Am i wrong to expect my validation block to be processed