[jQuery] changing the value of a global variable inside an post callback function?
i am building a function to validate a registration form for my site. one of
the things i need to validate is that the email address entered into the
form does not already exist in the database.
in my formValidate function i perform several tests. if a test fails i
increment a errorsFound variable. at the end of my function if errorsFound
is greater than 0, i do not submit the form.
the test for my email field does a $.post to a checkEmail - a page that
checks the database for duplicate email addresses. then my callback
function looks st the results of the post - if duplicates were found, i
increment my errorsFound variable.
problem is that from within my $.post callback function i cannot seem to
access my errorsFound variable.
how can i get my post callback function to increment my errorsFound
variable?
--
View this message in context: http://www.nabble.com/changing-the-value-of-a-global-variable-inside-an-post-callback-function--tf4111860s15494.html#a11691585
Sent from the JQuery mailing list archive at Nabble.com.