Hi John,

>Oh - sorry about that, something like this:
>
>$.ajaxTimeout( 5000 );
>
>$.ajax({
>    url: "doesnotexist.html",
>    error: function( req, msg ) {
>        if ( msg == "timeout" )
>            alert( "Connection to server lost." );
>    }
>});
>  
>
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".

>I'm realizing now that I pass the message in to the second argument -
>it should be the first. I'll change that in a later version, but it's
>nothing major. Hope that helps.
>  
>
Almost :-)
Cheers, Arash

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to