jQuery in Action, 2nd edition*
The moose likes HTML, CSS and JavaScript and the fly likes timeout in ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "timeout in ajax" Watch "timeout in ajax" New topic
Author

timeout in ajax

Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi guys,
Is it possible to set a timeout option for ajax ? like after 4secs of xmlhttprequest processing....say "requets timed out..."

Please give me some tips on this..

Thank you
Balaji


Spritle Software Blogs
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
you can use the abort() method to cancel the request.

YourAjaxObjectReference.abort();

Eric
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Thanks Eric... I will try it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: timeout in ajax