Magazine |
| | Community |
| | Workshop |
| | Tools & Samples |
| | Training |
| | Site Info |
|
|
||||||||
|
Fires when the behavior's containing document has been parsed.
Syntax
<PUBLIC:ATTACH EVENT = "ondocumentready" HANDLER = sEventHandler URN = sURN />
Remarks
When dealing with changes to an element's style property, such as setting its visibility, or changing colors or fonts, it is recommended that the changes be made inline in the HTC's <SCRIPT> block, as shown in the following code. Otherwise, making the change in the ondocumentready event handler can cause flashing.
<PUBLIC:HTC> <SCRIPT LANGUAGE="JScript"> style.color = "green"; style.letterSpacing = 5; : </SCRIPT> </PUBLIC:HTC>
Example
The following sample demonstrates basic usage of the ondocumentready event on a page.
<PUBLIC:ATTACH EVENT="ondocumentready" HANDLER="documentready_handler" /> <SCRIPT LANGUAGE="JScript"> function documentready_handler() { window.alert ("The ondocumentready event fired."); }
See Also
Does this content meet your programming needs? Write us!
© 1998 Microsoft Corporation. All rights reserved. Terms of use.