Return multiple values from Glide Ajax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2014 06:33 AM
Hi all,
I have a requirement like to return multiple values from script include at a time from glide ajax call and I have to store those values in different variables.
Can anyone please let me know how to write a script.
I am calling Script include from Client script Glide ajax
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2015 10:43 AM
Hi Meda
you can retrieve multiple values from glide ajax as below on client side
Client side
===========
function PopulateFNandLNResult(response) {
alert("Waiting for server Response");
var result = response.responseXML.getElementsByTagName("result");
var fn = result[0].getAttribute("FN");
var ln = result[0].getAttribute("LN");
g_form.setValue('f_n', fn);
g_form.setValue('l_n', ln);
}
and on script include, after you processing your business logic, you can add multiple values like below to return them to client script
glideAjax
=========
result.setAttribute("FN", variable1);
result.setAttribute("LN", variable2);
Thanks !