XMLHttpRequest Object methods

Jul 15
Description of the Methods and Properties used to make up the XMLHttpRequest Object
Method/PropertyDescription
abort()Stops the current request.
getAllResponseHeaders()Returns the response headers as a string.
getResponseHeader("headerLabel")Returns a single response header as a string.
open("method", "URL"[, asyncFlag[,
"userName"[, "password"]]])
Initializes the request parameters.
send(content)Performs the HTTP request.
setRequestHeader("label", "value")Sets a label/value pair to the request header.
onreadystatechangeUsed to set the callback function that handles request state changes.
readyStateReturns the status of the request:
0 = uninitialised
1 = loading
2 = loaded
3 = interactive
4 = complete
responseTextReturns the server response as a string.
responseXMLReturns the server response as an XML document.
StatusReturns the status code of the request.
statusTextReturns the status message of the request.

Filed under:
Web design
Posted by:
James Griffin
Dated:
July 15, 2006