:: Documentation >>

response

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.

null

Syntax

obj.response = function(data){...}

Parameters

data (string or object) - received data

Examples

var req = new AW.HTTP.Request;
req.setURL('<url>');
req.response = function(text) {
    alert(text); // do something with response here
};
req.request();

Remarks

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
};

See also

async property, request method

Comments

can you give a JSP example for returning a reponse to AW.HTTP.Request Precidion (0)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5