GlideAjax getXML Timeout?

Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 10:53 AM - edited 05-12-2023 08:06 AM
I have a widget that makes a GlideAjax async call using getXML(). I'm not sure what the default timeout is, but Community posts seem to indicate it is 5 minutes. This is about 4 minutes and 50 seconds longer than what I need to wait before displaying some indication to the user that a problem has occurred. Are there any provisions in GlideAjax simliar to jQuery's .ajax(timeout) param, or an .abort() option that I can call from inside a separate setTimeout()?
jQuery .ajax timeout example:
$.ajax({
url: "somepage.html",
error: function(){
// will fire when timeout is reached
},
success: function(){
//do something
},
timeout: 3000 // sets timeout to 3 seconds
});
0 REPLIES 0