onreadystatechange event | readystatechange event (XMLDocument)
Occurs when the load state of the XMLDocument object changes.
Use the readyState property in your event handler for the onreadystatechange event to get the current state.
How to register:
This event cannot be registered in HTML.
|object.onreadystatechange = handler;|
|object.addEventListener ("readystatechange", handler, useCapture);|
|object.attachEvent ("onreadystatechange", handler);|
You can find the related objects in the Supported by objects section below.
The event object is accessible to all event handlers in all browsers. The properties of the event object contain additional information about the current event. To get further details about these properties and the possible event handler registration methods, please see the page for the event object.
Actions that invoke the onreadystatechange event:
- If the load state of the XMLDocument object has changed.
Events related to the onreadystatechange event:
The ondataavailable event occurs each time when a new chunk of data becomes available from the source.
Example HTML code 1:
This example illustrates the use of the onreadystatechange event:
Did you find this example helpful?
User Contributed Comments