I am doing some form validation with a mix of javascript and server
side methods called via AJAX. When the submit button is pressed the
onclick calls the validation function that will return true if
everything checks out ok and false if not. The validation function is
setup like so:
function validateForm()
{
returnValue = true;
ajaxFunctionToCheckDate(); //the way it works, inside the function
is the only place to set
ajaxFunctionToCheckEmail(); // the returnValue to false if it does
not checkout
//the ajaxFunctions return to another javascript function
...
//right here I would like to do some polling to make sure all the
ajax functions have returned.
//I have tried using a settimout recursive function but that of
course does not work.
// because it allows the function to return
return returnValue;
}
anyway to make sure a function has returned before allowing the form to
submit?
Thanks,
Jake