About the Glide Ajax Response Process ?

sandeepgujj
Tera Contributor

ga.getXMLAnswer(function(response) {
alert(response); // Display the asset tag in an alert
}

which side it was async or sync ????

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@sandeepgujj This is an async API call, it accepts a function as an argument which gets executed when the response is received from the server.

 

Also, getXMLWait() is an example of synchronous API call as this call waits till the response comes from the server.

 

Hope this answers your question.

Robbie
Kilo Patron
Kilo Patron

Hi @sandeepgujj,

 

The getXMLAnswer() method as per the ServiceNow doc link below calls the processor asynchronously and gets the answer element of the response in XML format.

 

Link and definitive answer: https://developer.servicenow.com/dev.do#!/reference/api/xanadu/client/c_GlideAjaxAPI#r_GLAX-getXMLAn...

 

To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.





Thanks, Robbie