MY mENU


Monday 26 March 2012

XMLHttpRequest Properties

  • onreadystatechange
    An event handler for an event that fires at every state change.
  • readyState
    The readyState property defines the current state of the XMLHttpRequest object.
    Here are the possible values for the readyState propery:
    StateDescription
    0The request is not initialized
    1The request has been set up
    2The request has been sent
    3The request is in process
    4The request is completed
    readyState=0 after you have created the XMLHttpRequest object, but before you have called the open() method.
    readyState=1 after you have called the open() method, but before you have called send().
    readyState=2 after you have called send().
    readyState=3 after the browser has established a communication with the server, but before the server has completed the response.
    readyState=4 after the request has been completed, and the response data have been completely received from the server.
  • responseText
    Returns the response as a string.
  • responseXML
    Returns the response as XML. This property returns an XML document object, which can be examined and parsed using W3C DOM node tree methods and properties.
  • status
    Returns the status as a number (e.g. 404 for "Not Found" and 200 for "OK").
  • statusText
    Returns the status as a string (e.g. "Not Found" or "OK").

No comments:

Post a Comment