开发者

How do I check for an ajax request thats taking too long or just died out?

I'm using sajax here and at times my ajax queries seem to die out and theres no way for me to tell if something has gone wrong so I e开发者_高级运维nd up with an infinitely running preloader. What do I do?


i know you can canel existing ajax postback requests in the initilizerequest method clientside and that its possible to execute a javascript method after a set period of time using the 'setTimeOut' function. Therefore in the initilizerrequest method you could call a callseemstohave died method passing in a ref to the async postback and setting a time of say 30secs then if the call is still in progress callseemstohave is called you can cancel it and reset the display if it is finished do nothing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜