oncontentready Event

MS Office DHTML, HTML & CSS

oncontentready Event


Fires when the content of the element, to which the behavior is attached, has been completely parsed.

Syntax

<PUBLIC:ATTACH
    EVENT = oncontentready
    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.
document Refers to the document object.
element Default. Refers to the element to which the behavior is attached.
window Refers to the window object.
ONEVENT
Required. String that specifies an inline script or a direct invocation of the event handler function.
ID
Optional. String that uniquely identifies the ATTACH element within the component. This attribute is analogous to the ID attribute in DHTML.

Remarks

The innerHTML property of the element might not return the correct value until this event fires.

Example

This example uses the oncontentready event on a page to display the value of the element's innerHTML property.

<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="show_innerHTML()" />

<SCRIPT LANGUAGE="JScript">
function show_innerHTML()
{
   window.alert ('innerHTML = ' + element.innerHTML);
}
</SCRIPT>

See Also

dhtml behaviorsInternet Link, implementing dhtml behaviors in scriptInternet Link

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.