Welcome Guest, Not a member yet? Register   Sign In
[solved] don't understand javascript variable scope; now talking about validation plugin
#2

[eluser]Victor Michnowicz[/eluser]
The problem is that you are using AJAX. This means that your $.post is asynchronous. So your "return result;" is being run way before you AJAX request has even finished. You can make your $.post synchronous like so:

Code:
$.ajaxSetup({async:false});

However, I would guess that there is probably a better way to accomplish what you are trying to do.


Messages In This Thread
[solved] don't understand javascript variable scope; now talking about validation plugin - by El Forum - 01-25-2011, 07:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB