- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2018 12:16 AM
hi what is the work of "answer"....and what is get Attribute doing here pleae any one can explain me the complete line var answer = response.responseXML.documentElement.getAttribute("answer");
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2018 02:27 AM
var answer =response.responseXML.documentElement.getAttribute("answer");
Let us assume we have a function in Script Include :
demofunction: function () {
var element = this.getParameter('sysparm_parameter');
return 'Hi, This is bind with answer atrribute';
}
Now in client script -
function myCallBack(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer); // Output "Hi, This is bind with answer atrribute"
}
Here "response" is an XML document which contains an attribute "answer" and the value returned from the demofunction binded with the answer attribute.
So response.responseXML.documentElement.getAttribute("answer") gives us the value returned from the script include function.
Award Correct Answer if my Solution Works, Mark helpful if it helps...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2018 02:27 AM
var answer =response.responseXML.documentElement.getAttribute("answer");
Let us assume we have a function in Script Include :
demofunction: function () {
var element = this.getParameter('sysparm_parameter');
return 'Hi, This is bind with answer atrribute';
}
Now in client script -
function myCallBack(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer); // Output "Hi, This is bind with answer atrribute"
}
Here "response" is an XML document which contains an attribute "answer" and the value returned from the demofunction binded with the answer attribute.
So response.responseXML.documentElement.getAttribute("answer") gives us the value returned from the script include function.
Award Correct Answer if my Solution Works, Mark helpful if it helps...
