February 2018
Intermediate to advanced
226 pages
5h 13m
English
The client side of the AJAX call needs to set up the AJAX call and pass the relevant parameters to the server side. Once a response is received from the server, we can use the returned value or values to decide what changes to make. Let's have a look at how the client side of the AJAX call works:
var ajaxCall = new GlideAjax('serverAjax');
ajaxCall.addParam('sysparm_name','getUserLocation');
ajaxCall.addParam('sysparm_user_id', g_form.getValue('caller_id'));
ajaxCall.getXML(ajaxResponse);
function ajaxResponse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
}The preceding example covers the calling of the AJAX call and the return function, based on the results ...
Read now
Unlock full access