- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:16 AM
Hello @BALAJI K R
Check below pattern of script for reference of your requirement.
function onLoad()
{
var ajax = new GlideAjax('MyDateTimeAjax');
ajax.addParam('sysparm_name', 'firstfunction');
ajax.getXML(ajaxResponse);
function ajaxResponse(serverResponse) {
var answer = serverResponse.responseXML.documentElement.getAttribute("answer");
alert("s1"+answer);
}
var ajax1 = new GlideAjax('MyDateTimeAjax');
ajax1.addParam('sysparm_name', 'secondfunction');
ajax1.getXML(ajaxResponse1);
function ajaxResponse1(serverResponse) {
var answer1 = serverResponse.responseXML.documentElement.getAttribute("answer");
alert("s2"+answer1);
}
}
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:16 AM
Hello @BALAJI K R
Check below pattern of script for reference of your requirement.
function onLoad()
{
var ajax = new GlideAjax('MyDateTimeAjax');
ajax.addParam('sysparm_name', 'firstfunction');
ajax.getXML(ajaxResponse);
function ajaxResponse(serverResponse) {
var answer = serverResponse.responseXML.documentElement.getAttribute("answer");
alert("s1"+answer);
}
var ajax1 = new GlideAjax('MyDateTimeAjax');
ajax1.addParam('sysparm_name', 'secondfunction');
ajax1.getXML(ajaxResponse1);
function ajaxResponse1(serverResponse) {
var answer1 = serverResponse.responseXML.documentElement.getAttribute("answer");
alert("s2"+answer1);
}
}
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:17 AM
Hi @BALAJI K R,
Yes. Possible to use the multiple GlideAjax call in a same client scripts as per the requirements.
Note: If there is complex and time taking GlideAjax call, may be you can keep in separate client scripts.
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:23 AM - edited 07-31-2023 06:25 AM
Calling multiple glideajax is a time consuming activity, user has to wait for a long time
Explain your use case in details so i can help you.
Thanks,
Manjusha Bangale