ondocumentready Event

Internet Development Index

Fires when the behavior's containing document has been completely parsed.

Syntax

<PUBLIC:ATTACH
EVENT = ondocumentready
ONEVENT = sEventHandler
FOR = element
ID = sID
/>

Attributes

EVENT
Required. String that specifies the name of a Dynamic HTML (DHTML) event, or any of the events specific to the HTML Component (HTC) that are listed in the HTC Reference.
FOR
Optional. String that specifies one of the following values to identify the source of the event.
documentRefers to the document object.
elementDefault. Refers to the element to which the behavior is attached.
windowRefers to the window object.
ID
Optional. String that uniquely identifies the PUBLIC:ATTACH element within the component. This attribute is analogous to the ID attribute in Dynamic HTML (DHTML).
ONEVENT
Required. String that specifies an inline script or a direct invocation of the event handler function.

Remarks

A behavior attached to an element receives both the ondocumentready and oncontentready notifications, but only after the window.onload event has fired.

See Component Initialization for an overview of events fired during the initialization of an HTC file and its primary document.

See Also

oncontentready, Introduction to DHTML Behaviors, About Element Behaviors, Using HTML Components to Implement DHTML Behaviors in Script