HOME  |  AJAX  |  SOLUTIONS  |  TECHNOLOGIES  |  E-COMMERCE  |  ABOUT US
XmlHttpRequest Methods
There are actually not that many methods available on the XmlHttpRequest object.  There are only 6 methods that the XmlHttpRequest can call.
abort()
This cancels the current request as expected.
getAllResponseHeaders()
Returns all the response headers as a key / value pair.
getResponseHeader(header)
This returns the value of the specified header.
open(method, url)
This prepares the XmlHttpRequest object for a call to the server.  Method can either be POST, GET, or PUT.  Url can be relative or absolute, but it should be known that you can't make cross domain calls for security reasons.  If you need to make cross domain calls, you will have to do some work on the server side to make it happen correctly.  If you are passing parameters with via GET, you can append them to the URL here.
send(body)
This method actually sends the request to the server.  The body parameter can be used to pass any POST parameters that you would like.  You can format your POST parameters just like a GET querystring.
setRequestHeader(header, value)
The final method allows you to set the specified header with the given value.  You will most often use this function for setting the content type of the request.

Those are the 6 methods available to you via the XmlHttpRequest object.  Additionally, the XmlHttpRequest object also provides 6 properties for you to use.