- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2015 11:25 PM
I have created a button on click of which a script include is called. I am using getXMLWait() for response to come from script include. It takes very much time to have the response from script include because of large processing in my script.
So for a while it looks like nothing is happening after clicking that button.
Is there any way i can show loading form or processing meanwhile on the screen?
i have used showLoadingDialog() method before calling my script include but it is not working..
My script is:
function XYZ() {
showLoadingDialog();
var sub = new GlideAjax("XYZOrder");
sub.addParam('sysparm_name', "Order");
sub.getXMLWait();
var yes = sub.getAnswer();
hideLoadingDialog();
}
Please Help!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2015 02:38 PM
I've run into this as well, some browsers don't load it for it processes to quickly; I've found a workaround with using setTimeout()
Could try that and see if it assists? (long shot but may work).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2015 02:38 PM
I've run into this as well, some browsers don't load it for it processes to quickly; I've found a workaround with using setTimeout()
Could try that and see if it assists? (long shot but may work).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2015 10:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2015 03:42 AM
Have you tried using the async getXML method like:
function XYZ() {
showLoadingDialog();
var sub = new GlideAjax("XYZOrder");
sub.addParam('sysparm_name', "Order");
sub.getXML(function() {
var yes = sub.getAnswer();
hideLoadingDialog();
});
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2015 04:27 AM
Sync or Async showLoadingDialog(); works. I have used in many of my implementation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2015 10:25 PM
Thanks all for your suggestions and help.