Allows to process the received data. This is a callback method - it is called by the object after the response data is fully received.
The received data (text or xml) is passed as an argument.
nullobj.response = function(data){...}
data (string or object) - received data
var req = new AW.HTTP.Request;
req.setURL('<url>');
req.response = function(text) {
alert(text); // do something with response here
};
req.request();
If the received data is valid XML sent with text/xml mime-type then the data argument in response callback will be XML DOMDocument object, otherwise text.
The response callback in AW.XML.Table and AW.CSV.Table contains the code which clears grid data and repaints the grid. In case you want to add your own code to the callback it could be done this way -
req.response1 = req.response; // save the original method
req.response = function(data) {
this.response1(data); // call the original method
// add your code here
};