readyState property (object)
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.
Syntax:
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:
|
||||
<head> <script type="text/javascript"> function GetState (elem) { var flash = document.getElementById ("flash"); alert ("readyState: " + flash.readyState); } </script> </head> <body onload="GetState ()"> <object id="flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="120"> <param name="movie" value="flash.swf" /> </object> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
Related pages:
External links:
User Contributed Comments