Transmits the data with information that may be posted, if needed
setRequestHeader ("label", "value")
assigns label, value pair for the header
While open() and send() are most often used, the others are also useful in some cases. The open() method begins the interaction and takes two mandatory arguments; the "method" used to open, which is either GET or POST, and the URL to which the request is made.
The GET and POST methods are similar to those used in ASP, as some of you might recognize. The GET is indicated for retrieving read only data while POST is for sending data to the server.
The URL could be complete, or a relative URL.
The third parameter which is optional (default value TRUE being asynchronous) sets the interaction to be synchronous (FALSE) or asynchronous (TRUE). If you choose the synchronous route, the script waits for the response to arrive before acting. The useful mode is to set the interaction to be asynchronous and use the onreadystatechange event (to be discussed) to get at the response.
XMLHttpRequest Object Properties
The following read only properties are browser agnostic (all supported browsers understand them).
Event handler which fires every time the state changes
Integer representing the status of the object 0 = uninitialized 1 = loading 2 = loaded 3 = interactive 4 = complete
Data returned in string format
Data returned in DOM Compatible format
Numeric code returned by server indicating status 404: Not found 200: OK