XML DOM » HttpRequest » readyState

Syntax:
httpRequest.readyState

This property represents the state of the request.

The readyState property indicates the current state of the request. It returns a 4-byte integer. This property is read-only and has the following defined values:

  • UNINITIALIZED(0)
    The object has been created, but has not been initialized (the open method has not been called).
  • LOADING(1)
    The object has been created but the send method has not been called.
  • LOADED(2)
    Thesend method has been called and the status and headers are available, but the response is not.
  • INTERACTIVE(3)
    some data has been received. You can get the partial results using the responseBody and the responseText properties.
  • COMPLETED(4)
    All the data has been received, and is available.