This could be accomplished using a synchronous xmlhttp call (does
jQuery even support this?), or you could put a while loop before the
return true to poll a variable that is set in the callback. You would
probably want to set the variable if there is an error as well so that
the browser doesn't
You can use async: false, check the docs:
http://docs.jquery.com/Ajax/jQuery.ajax
That's the closest thing to a 'pause' in JS, but that is not good as
it will freeze the whole browser while waiting for the server
response. The best solution would be to use the load callback, but
then you can't
async:false doesn't just freeze the entire browser, in many browsers it may
freeze every browser window as well, even windows open on other sites.
Adam, why can't the code you need to execute be called from the success
callback function?
-Mike
From: Ricardo Tomasi
You can use async: false,
On Jan 28, 2009, at 3:34 PM, Michael Geary wrote:
async:false doesn't just freeze the entire browser, in many browsers
it may
freeze every browser window as well, even windows open on other sites.
Adam, why can't the code you need to execute be called from the
success
callback
4 matches
Mail list logo