JavaScript XMLHttpRequest responseText Property

Once an XMLHttpRequest has been initiated, sent and a response received, the XMLHttpRequest will have a responseText property. This property contains the server response, excluding headers.

Note that responseText is not fully loaded until the XMLHttpRequest readyState is 4. The responseText property can also contain a partial portion of the final result text if readyState is 3, which means that data is in the process of being received from the server.

To access this property: If an XMLHttpRequest call is saved in a variable named objXHR, the responseText can be accessed as objXHR.responseText.

Related articles:
JavaScript XMLHttpRequest readyState values

Leave a Reply