You are here: Reference > JavaScript > client-side > HTML DOM > properties > readyState (object)

readyState property (object)

Browser support:
Returns an integer value that indicates the state of the object element.
Use this property together with the onreadystatechange event to be notified when the state changes.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Integer that represents the state of the object.
One of the following values:
Object is not initialized.
The data of the object is currently loading.
The data of the object has been loaded.
A part of the data is available.
Initialization is ready.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the readyState property:
    <script type="text/javascript">
        function GetState (elem) {
            var flash = document.getElementById ("flash");
            alert ("readyState: " + flash.readyState);
<body onload="GetState ()">
    <object id="flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
        codebase=",0,0,0" width="300" height="120">
        <param name="movie" value="flash.swf" />
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content