By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,155 Members | 1,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,155 IT Pros & Developers. It's quick & easy.

Polling function that halts other execution

P: n/a
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

Jan 24 '06 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Its alot faster than submitting, I am not worried about the enabled
scripting either.

Jan 24 '06 #2

P: n/a
On 24/01/2006 17:33, Lee wrote:

If you're going to use AJAX to validate, you lose that convenience
and add an absolute requirement of enabled scripting.

Perhaps the more important concern is that if the server is used in this
way to validate, is proper server-side validation being skipped? If it
is, that's a major security issue.


Michael Winter
Prefix subject with [News] before replying by e-mail.
Jan 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.