Your success handler will not be called if the request times out. You
need to use and "error" handler or a "complete" handler.
var options = {
beforeSubmit: showRequest, // pre-submit callback
success: showResponse, // post-submit callback
complete: function(xhr, status) {
// status == 'timeout' when there is a timeout
},
error: function(xhr, status, ex) {
// status == 'timeout' when there is a timeout
},
dataType: 'json',
timeout: 10000
};
Mike
On 9/16/07, debussy007 <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I have put a timeout for the ajax request when submitting my form :
>
> var options = {
> beforeSubmit: showRequest, // pre-submit callback
> success: showResponse, // post-submit callback
> dataType: 'json',
> timeout: 10000
> };
>
> But the problem is that I don't know in my code if there has been a timeout
> or not.
> I expected to go in method showResponse and have statusText to false.
>
> Can anyone help me ?
> Thank you.
> --
> View this message in context:
> http://www.nabble.com/Help-for-Form-plugin-tf4450785s15494.html#a12698312
> Sent from the JQuery mailing list archive at Nabble.com.
>
>