I have a code like this:
$("button[value^='SAVEALL']").live("click",function(){
rowCheck(1);
rowCheck(2);
columnCheck(A);
columnCheck(B);
alert("all function passed");
});
function rowCheck(x){
if (x>10){
return false;
}
}
function columnCheck(a){
if (a=="A"){
return false;
}
}
The code above, it only running the 1st function then it directly submits the form.
How to make sure it runs all the functions and submit the form once they all return true.
First you need your function to return both true or false
like
then in change your code for click