Results 1 - 20 of 25

XMLHttpRequest.readyState

The XMLHttpRequest.readyState property returns the state an XMLHttpRequest client is in. An XHR client exists in one of the following states:
AJAX Property Reference XMLHttpRequest

XMLHttpRequest.response

The XMLHttpRequest.response property returns the response's body. It can be of the type ArrayBuffer, Blob, Document, JavaScript object, or a DOMString, depending of the value of XMLHttpRequest.responseType property. Value of response is null if the request is not complete or was not successful. However, if the value of responseType was set to "text" or the empty string, response can contain the partial text response while the request is still in the loading state.
AJAX Reference XMLHttpRequest

XMLHttpRequest.responseType

The XMLHttpRequest.responseType property is an enumerated value that returns the type of the response. It also lets the author change the response type to one "arraybuffer", "blob", "document", "json", or "text". If an empty string is set as the value of responseType, it is assumed as type "text".
AJAX Reference XMLHttpRequest

XMLHttpRequest.responseURL

The XMLHttpRequest.responseURL property returns the serialized URL of the response or the empty string if the URL is null. If the URL is returned, URL fragment if present in the URL will be stripped away. The value of responseURL will be the final URL obtained after any redirects.
AJAX Reference XMLHttpRequest

XMLHttpRequest.responseXML

The XMLHttpRequest.responseXML property returns a Document containing the response to the request, or null if the request was unsuccessful, has not yet been sent, or cannot be parsed as XML or HTML. The response is parsed as if it were a text/xml stream. When the responseType is set to "document" and the request has been made asynchronously, the response is parsed as a text/html stream. responseXML is null for data: URLs.
AJAX API Reference XMLHttpRequest

Sending and Receiving Binary Data

The responseType property of the XMLHttpRequest object can be set to change the expected response type from the server. Possible values are the empty string (default), "arraybuffer", "blob", "document", "json", and "text". The response property will contain the entity body according to responseType, as an ArrayBuffer, Blob, Document, JSON, or string. This is null if the request is not complete or was not successful.
AJAX FileReader MIME XMLHttpRequest

XMLHttpRequest.statusText

The XMLHttpRequest.statusText property returns a DOMString containing the response's status message as returned by the HTTP server. Unlike XMLHTTPRequest.status which indicates a numerical status code, this property contains the text of the response status, such as "OK" or "Not Found". If the request's readyState is in UNSENT or OPENED state, the value of statusText will be an empty string.
AJAX API Reference XMLHttpRequest

XMLHttpRequest.timeout

The XMLHttpRequest.timeout property is an unsigned long representing the number of milliseconds a request can take before automatically being terminated. The default value is 0, which means there is no timeout. Timeout shouldn't be used for synchronous XMLHttpRequests requests used in a document environment or it will throw an InvalidAccessError exception. When a timeout happens, a timeout event is fired.
AJAX Property Reference XMLHttpRequest

XMLHttpRequest.withCredentials

The XMLHttpRequest.withCredentials property is a Boolean that indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. Setting withCredentials has no effect on same-site requests.
AJAX API Property Reference XMLHttpRequest

Using FormData Objects

The FormData object lets you compile a set of key/value pairs to send using XMLHttpRequest. It is primarily intended for use in sending form data, but can be used independently from forms in order to transmit keyed data. The transmitted data is in the same format that the form's submit() method would use to send the data if the form's encoding type were set to multipart/form-data.
AJAX Blob File FormData Forms XHR XMLHttpRequest

XDomainRequest

XDomainRequest is an implementation of HTTP access control (CORS) that worked in Internet Explorer 8 and 9. It was removed in Internet Explorer 10 in favor of using XMLHttpRequest with proper CORS; if you are targeting Internet Explorer 10 or later, or wish to support any other browser, you need to use standard HTTP access control.
AJAX API IE JavaScript Microsoft Obsolete Web

XDomainRequest.open()

Opens an XDomainRequest which is configured to use a given method (GET/POST) and URL.
AJAX IE JavaScript Method Microsoft Obsolete Reference

XDomainRequest.responseText

Returns the response body of an XDomainRequest as a string.
AJAX IE Microsoft Obsolete Property Reference

XMLHttpRequest

XMLHttpRequest is an API that provides client functionality for transferring data between a client and a server. It provides an easy way to retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just a part of the page without disrupting what the user is doing.  XMLHttpRequest is used heavily in AJAX programming.
AJAX API HTTP Interface Reference Web XHR

XMLHttpRequest.send()

The XMLHttpRequest.send() method sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived. send() accepts an optional argument for the request body. If the request method is GET or HEAD, the argument is ignored and request body is set to null.
AJAX API NeedsContent NeedsExample Reference XMLHttpRequest

XMLHttpRequest.upload

The XMLHttpRequest.upload property returns an XMLHttpRequestUpload object, representing the upload process. It is an opaque object, but being an XMLHttpRequestEventTarget, event listeners can be set on it to track its process.
AJAX API Property Read-only Reference XMLHttpRequest

XMLHttpRequestEventTarget

XMLHttpRequestEventTarget is the interface that describes the event handlers you can implement in an object that will handle events for an XMLHttpRequest.
AJAX API NeedsBrowserCompatibility NeedsContent Reference XMLHttpRequest

XDomainRequest.onerror

An event handler which is called when an XDomainRequest encounters an error.
AJAX API DOM IE Microsoft Obsolete Property Reference