[jQuery] Re: How to synchronize ajax events

2009-03-12 Thread Andy789
Thank you guys! I have made a slightly different logic, which seems to be working fine: function zipSearch2(){ var zip = $j('input#zip_entry').attr('value'); alert('second '+validation); ... } function zipSearch(){ var zip = $j('input#zip_e

[jQuery] Re: How to synchronize ajax events

2009-03-12 Thread Andy789
Thank you guys! I have made a slightly different logic, which seems to be working fine: function zipSearch2(){ var zip = $j('input#zip_entry').attr('value'); alert('second '+validation); ... } function zipSearch(){ var zip = $j('input#zip_e

[jQuery] Re: How to synchronize ajax events

2009-03-12 Thread Karl Rudd
That will work but it has some rather unexpected consequences, the biggest of which is that the entire browser will lock up (UI and all) until the response comes back from the server (which could be a few seconds). That's not a good thing to do to a user. Karl Rudd On Fri, Mar 13, 2009 at 10:47

[jQuery] Re: How to synchronize ajax events

2009-03-12 Thread James
Setting your 'async' option to 'false' in your AJAX options should solve this issue. By default AJAX is asynchronous so your script will not wait for your AJAX response before it continues. Setting 'async' to false will have the script wait. On Mar 12, 1:34 pm, Karl Rudd wrote: > I suggest look

[jQuery] Re: How to synchronize ajax events

2009-03-12 Thread Karl Rudd
I suggest looking at one of the Ajax helper plugins, such as: http://plugins.jquery.com/project/AjaxManager If you want to DIY you'll need to either build some sort of "queue" or nest the validation You could also try the validation plugin ( http://plugins.jquery.com/project/validate ) which