> thank you, but it's not working for me. Maybe I am misinterpreting > something... I load the page in my browser, disconnect from network, > start an ajax-request and wait for 5000 milliseconds. What happens is > that $.ajaxStop is correctly called, but none of the others (complete, > success, error). If I choose "doesnotexist.html" as a url, like in your > example, the error-Handler is called, but with a value of "error" > instead of "timeout".
Ok - currently, "unplugging your internet" is not the same thing as "timing out". Ironically (?) the browser behaves differently when you unplug the internet, sometimes throwing exceptions instead of just failing. As far as the example, you are correct, it is "error", not timeout - my mistake. I guess a better example would be to request a page that take a long time to load, for example: $.ajax({ url: "sleepy.cgi", error: .... }); sleepy.cgi: #!/usr/bin/perl sleep(15); print "Content-type:text/html\n\ndone"; I'm working on adding in the "unplug the internet, have it fail gracefully" functionality. Hopefully it'll be in by 1.1. --John _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/