abort() :- This method cancels a user request.
getAllResponseHeaders() :- Returns a collection of HTTP headers as string. If you want a specific header value you can use getResponseHeader("headername") open("method","URL", "async", "uname","pswd") :- This method takes a URL and other values needed for a request. You can also specify how the request is sent by GET, POST or PUT. One of the important values is how this request will be sent asynchronously or synchronously. true means that processing is carried after the send () method, without waiting for a response. false means that processing is waits for a response before continuing. send
(content):- Sends a request to the server resource. setRequestHeader("label"," value") :- Sets label value pair for a HTTP header. onreadystatechange :- This is a event handler which fires at every state change. readyState :- Returns the current state of the object.
0 = uninitialized
1 = loading
2 = loaded
3 = interactive
4 = complete
If you want to check the state use if ( xmlHttpObj.readyState ==4).
responseText :- Returns the response in plain string.
responseXML :- Returns the response as XML. So this gives us DOM object model which can then be traversed.
status: - Returns the status as a numeric For instance 404 for "Not Found" or 200 for "OK", 500 for "Server Error" etc.
statusText :- Returns the status as a string. For instance "not found" or "OK".