COMPONENT Element

DHTML, HTML, & CSS

 
Click to return to the Component Development home page    
ATTACH Element     EVENT Element     HTC Reference    

COMPONENT Element


Identifies the content of the file as an HTML Component (HTC).

Syntax

<PUBLIC:COMPONENT
    NAME = sName
    URN = sURN
    ID = sID
/>

Attributes

NAME
Optional. String that specifies the name by which the behavior is referred to in the containing document. This is especially useful when multiple behaviors are attached to an element, as it allows you to invoke the properties or methods of the desired behavior from the containing document.

If multiple behaviors are attached to a <SPAN ID="mySpan"> element in a document, you can use the following syntax to set the delay property of the behavior named behaviorABC.

   mySpan.behaviorABC.delay = 1000;
URN
Required. String, in Uniform Resource Name (URN) format, that uniquely identifies the component. This allows events to be uniquely identified when multiple behaviors may be firing events of the same name. When the event is fired, the event object's srcURN property is set to the URN of the behavior that fired the event.
ID
Optional. String that uniquely identifies the COMPONENT element within the component. This attribute is analogous to the ID attribute in Dynamic HTML (DHTML).

Element Information

Number of occurrences None or one
Parent elements None
Child elements ATTACH, EVENT, METHOD, PROPERTY
Requires closing tag Yes

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.