XMLHttpRequest [FF] and ActiveXObject("Microsoft.XMLHTTP") [IE 5.5]

These objects are used extensively in Ajax, as described in Chapter 14, Chapter 15, Chapter 16, and Chapter 17.

Properties

readyState

State of the request

responseText

String containing the response to the request

responseXML

If the response is an XML document, it is stored here

status

Response status from the server

Methods

abort()

Cancels the request

open()

Tells the request object where the request should go and what kind of request it is. See Chapter 14 for more information.

send()

Sends the request. If this is a POST-type request, the information to send to the server is sent as a parameter. Otherwise, the parameter is null.

Handlers

onReadyStateChange

Triggered when the request object's

Get The Book of JavaScript, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.