Probably because Validate.fail(test) occurs immediately
after the asynchronous call. Remember it is ASYNCHRONOUS, meaning it
executes parallel to javascript running on your page.
use async: false in $.ajax request
References :
javascript - Use variable outside the success function from an ajax/jquery call - Stack Overflow
use async: false in $.ajax request
References :
javascript - Use variable outside the success function from an ajax/jquery call - Stack Overflow
沒有留言:
張貼留言