HTC reference ---------------------------------------------- -------------------------------------- In Microsoft (R) Internet Explorer 5, HTML Component (HTCs) provides a mechanism to use scripts as dynamic HTML (DHTML) behaviors implement component functions. Save with .htc extensions, an HTC is an HTML file containing scripts and a set of HTC special elements for defining components. This section contains related elements and members they support.
Object Document represents an HTML document in a given browser window. ELEMENT returns a reference to the label of the connection behavior in the main document. Public: Attach Binds a function to an event, so the function is called when each event occurs on a special object. Public: Component indicates the content of the file in HTC. Public: Defaults Sets a default attribute of an HTC. Public: Event Defines an HTC event to expose it to a document containing the HTC. Public: Method defines a method of HTC to expose it to a document that contains the HTC. Public: Property defines an HTC's properties to expose it to a document containing the HTC.
Method CreateEventObject creates an event object that is used when the event attached information is required to send the event additional information.
The content of an event onContentReady is fully parsed when the content of the active element is fully parsed. OnContentSave is connected to an element of an elemental behavior that occurs before being saved or copied. ONDTACH happens before the connection is released from one element. OndocumentReady occurs when the document containing behavior is completely parsed.
[Tutorial] HTC reference ---- Element object
Element object ------------------------------------------------------------------------------------------------------------ -------------------------------------- Return to a reference to the label of the connection behavior in the main document .
The table below the Member Table lists the members of the Element object exposed. Method CreateEventObject creates an event object that is used when the event attached information is required to send the event additional information.
Remarks all properties, methods, and events of elements that are connected to the behavior can be accessed by this object by this object by HTML component (HTC). The ELEMENT object is the default object of the event name specified in the property, method, or HTC. Therefore, they can be specified directly without having to use the Element keyword.
Sample ms-help: //ms.msdnqtr.2003apr.1033/behavior/Workshop/components/htc/reference/Objects/Element.htm-------------------- -------------------------------------------------- ----------------
[Tutorial] HTC reference ---- public: attach element
Public: attach element ---------------------------------------------- --------------------------------------- Bind a function to an event, therefore The function will be called when each event occurs on a special object.
Format
Attribute Event is required. Specifies a dynamic HTML (DHTML) event, or any string of the HTML component (HTC) specified by the HTML component (HTC) in the HTC reference. For options. Specifies a string in the following value to identify the event source. Document references the Document object. ELEMENT default. Reference elements of behavior connection. WINDOW references to the Window object. ID is optional. The unique identifier string of the PUBLIC: Attach element in the component. This property is similar to the id attribute in DHTML. Onevent must be selected. Direct declaration of the event handler or specified string of the in-line script. Element Information Parent Elements PUBLIC: Component Child Element No Smaller Run Environment Internet Explorer 5 Minimum Operating System Windows 95, Windows NT 4.0
Remarks public: attach element is a statement of Attachevent methods. When the specified event occurs when the behavior is connected, the element is first called the element's event processing section, and before the active event processing. If multiple behaviors are connected to an element, the plurality of event processing sections are defined on the same event of the same element, and the function is randomly called after the element event processing section is called. When providing one value for Onevent, avoid the name of the event processing partial function that already exists in an existing DHTML event. The name of using an existing DHTML event may be recursively incorrect. The name of the event is sensitive to all scripting languages.
Sample ms-help: //ms.msdnqtr.2003apr.1033/behavior/Workshop/components/htc/reference/Elements/attach.htm -------------------- -------------------------------------------------- ---------------- [Tutorial] HTC Reference ---- Public: Component Element
PUBLIC: Component Elements ---------------------------------------------- ---------------------------------------- Indicate the contents of the document with HTC.
The new content of Microsoft Internet Explorer 6 LiteralContent property is a new possible value support nested, creating a nested text content element behavior.
Format
Attribute ID is optional. Unique identifier string of the component in the component. This property is similar to the id attribute in DHTML. Lightweight is optional. Specifies whether the HTC file contains a string of the tag. If the HTC file does not contain a tag, this property should be set to true to improve the performance effect. This property is valid for any HTC file. The TRUEHTC file does not contain tags, so there is no need to parse and behave in the custom label. These tags are defined by the HTC file and is used in the main document. False default. The HTC includes a custom label that must be parsed and manifested. These tags are defined by the HTC file and is used in the main document. LiteralContent is optional. Specifies the content contained in the custom label to be parsed and manifested, or is a string that is treated as a data island. This attribute is only valid when the HTC file defines an element behavior, and the tagname property is required. For more information, please refer time. False default. The text and label within the tag defined by the tagname property is also parsed and manifested. NESTEDINTERNET Explorer 6 and later versions. Content Withnin The first opening and last closing of the tag defined by the Tagname attribute is what is used as a data island and is not pased or rendered. For more information, please refer to the LITERALCONTENT property. TrueContent Withnin The first Opening and last closing of the tag defined by The Tagname Attribute IS Treated as a data island and is not pased or rendered.name Optional. Specifies a string of the name of the behavior submitted in the main document. Supporteditmode is optional. Specify whether the HTC file content is editable. This attribute is only valid when the HTC file is defined. TrueHTC files contain tags editable. False default. The tab containing the HTC file is not editable. You can overload this property value by setting the iSconteTedITable property for each element in the HTC file to be Variant_true. Tagname is optional. Specify a string of the custom tag name, this tag is defined by the HTC file and imported into the main document. This attribute is only valid when the HTC file is defined. For more information, please refer time. URN is optional. String, in a Unified Resource Name (URN) format, so that this component is uniquely identified. Therefore, it is possible to uniquely identify when multiple behaviors occur in the same name. When an event occurs, the SRCURN property of the EVENT object is set to a URN that happens in an event. Element information sub-element elements have occurred once PUBLIC: Defaults One or many times Public: attach, public: event, public: method, public: property minimum operating environment Internet Explorer 5 Minimum operating system Windows 95, Windows NT 4.0
Remarks Public: Component Elements can define two distinctive types of behavior. One is the connection behavior, using the Behavior Stamping Style Table (CSS) property to modify the behavior of an existing element. The second type is described in Internet Explorer 5.5, called an elemental behavior. One element behavior is used to define a custom label used in the web page as the standard HTML tag. An element behavior means creation and use of a custom label in the web page. Therefore, when the HTC file defines an element behavior, it is necessary to define the tagname property of the public: Component element. As previously indicated, some of this element is specifically designed for elemental behavior. More information clear query element behavior. When multiple behaviors are connected to the same element, the Name property is particularly useful. Because it allows you to call the properties and methods of the behavior they need in the document. If multiple behaviors in a document are connected to a element, you can use the DELAY properties of the behavior named Behavio Arointeritic behavior using the following format. Myspan.behaviora idik.delay = 1000; ----------------------------------------- --------------------------------------------- [Tutorial] HTC reference ---- Public: Defaults Elements PUBLIC: Defaults Elements -------------------------------------- ------------------------------------------------set up A default attribute of HTC.
Format
Attribute CanhaveHtml is optional. Specifies the Boolean value of one of the following. The content of the label defined by the Falsehtc file cannot contain an HTML tag. The contents of the TRUEHTC file definition can include an HTML tag. ContenTedITable is optional. Specifies the Boolean value of one of the following. Inherit default. The ability to edit from its parent inheritance is user edited. The content of the label defined by the Falsehtc file cannot be edited. The contents of the TRUEHTC file definition can be edited. STYLE options. Specify the style string of the tag defined by the HTC file. TabStop is optional. Specifies the Boolean value of one of the following. False default. The label defined by the HTC file cannot be activated by Tab. TrueHTC file defined by the TRUEHTC file can be activated by Tab. ViewinheritStyle Optional. Specifies the Boolean value of one of the following. FalseViewLink does not inherit the style from the main HTML file. True default. ViewLink inherits the style from the main HTML file. ViewLinkContent is optional. Specifies the Boolean value of one of the following. False default. Tags in the document of the HTC file are not used as ViewLink. Truehtc files are used in the documentation of the TRUEHTC file as ViewLink. ViewMastertab is optional. Specifies the Boolean value of one of the following. The main element of FalseViewLink is not included in the TAB sequence of the main document. True default. The main element of ViewLink is included in the TAB sequence of the main document.
Element Information Parent Elements PUBLIC: Component Child Element No Smaller Run Environment Internet Explorer 5 Minimum Operating System Windows 95, Windows NT 4.0
Remarks Use more information to use ViewLinkContent attributes in the HTC file, and see the ViewLink section created in the ViewLink section. -------------------------------------------------- ------------------------------------ [Tutorial] HTC reference ---- public: EVENT element
Public: EVENT Elements -------------------------------------------- ---------------------------------------- Define an HTC event to expose it to Contains documents of the HTC.
Format
Attribute ID is optional. The unique identifier string of the PUBLIC: EVENT element in the component. This property is similar to the id attribute in DHTML. Name must be selected. Specifies a string of the name of the event submitted in the main document.
Method EventID.fire ([OEvent]) The document inclusive event occurs. This method has the following parameters: OEVENT Specifies the object of the additional information contained in the EVENT object.
Element Information Parent Elements PUBLIC: Component Child Element No Smaller Run Environment Internet Explorer 5 Minimum Operating System Windows 95, Windows NT 4.0
Note By specifying a Name property, a behavior can be overloaded by default behavior by specifying a NAME attribute. The event defined by the behavior does not afford it. They only occur on elements that are connected to the behavior.
Sample ms-help: //ms.msdnqtr.2003apr.1033/Behavior/Workshop/components/htc/reference/Elements/Event.htm -------------------- -------------------------------------------------- ----------------
[Tutorial] HTC reference ---- public: Method element
Public: Method Elements ---------------------------------------------- -------------------------------------- - Define an HTC method to expose it to Contains documents of the HTC.
Format
Attribute ID is optional. Unique identifier string of the PUBLIC: METHOD element in the component. This property is similar to the id attribute in DHTML. INTERNALNAME is optional. A string containing the name submitted by the specified method in the document. By default, Name also specifies the method submitted to the component unless the INTERNALNAME attribute is specified.
Element Information Parent Elements PUBLIC: Component Child Element No Smaller Run Environment Internet Explorer 5 Minimum Operating System Windows 95, Windows NT 4.0
Remark When the specified Name property is the same as the name of the standard method defined for this element, a behavior can overload the default behavior of the element.
Sample ms-help: //ms.msdnqtr.2003apr.1033/Behavior/Workshop/components/htc/reference/Elements/Method.htm -------------------- -------------------------------------------------- ----------------
[Tutorial] HTC reference ---- public: Property element
PUBLIC: Property element ------------------------------------------------------------------------------------------------------------------------ --------------------------------------- Define an HTC attribute to expose it to Contains documents of the HTC. Format
Attribute GET is optional. Specifies the string of the function called when the property value is obtained. A public: Property element that only specifies the get attribute without specifying the PUT property is a read-only property. ID is optional. Unique identification string of the PUBLIC: Property element in the component. This property is similar to the id attribute in DHTML. INTERNALNAME is optional. A string containing the name submitted by the specified method in the document. This internal name must be widely associated before any reference within the component; otherwise, a script error will appear and point out that the name is not defined. If there is no internal name being specified, the Name property is used by default. Name must be selected. Specifies a string that exposes the name of the attribute containing the document. By default, Name specifies the submission of the component within the component unless the INTERNALNAME attribute is specified. PERSIST is optional. Specifies whether to persist of the boolean value of the portion of the property as the leaves. PUT is optional. Specifies the string of the function called when the property value is set. A public: Property element specified for the GET and PUT attributes is a read and write attribute. A PUT function is specified, and the specified GET function specifies fails, which will only be written, which is generally not desirable. Value is optional. Specifies the variable of the attribute default value.
Method Propertyid.fireChange () notified that the document property value is changed when an onPropertyChange event occurs on an element. If the property does not have a PUT attribute being specified, OnPropertyChange will automatically occur when the property is set in the containment.
Element Information Parent Elements PUBLIC: Component Child Element No Smaller Run Environment Internet Explorer 5 Minimum Operating System Windows 95, Windows NT 4.0
Remark When the specified Name property is the same as the name of the standard method defined for this element, a behavior can overload the default behavior of the element. If the PUT or Get property is specified, the internalName property is ignored. The priority is higher than the attribute value by setting and / or obtaining the attribute value by the function specified in the PUT and Get attributes. The function specified by the PUT attribute must be aware that the element containing the elements in the document changes the attribute value using the Firechange method of the public: Property element. Calling this method results in an OnPropertyChange event to occur in the corresponding element containing the document, while the property of the EVENT object is set to the name of the attribute.
Sample ms-help: //ms.msdnqtr.2003apr.1033/Behavior/Workshop/components/htc/reference/Elements/Property.htm-------------------- -------------------------------------------------- ---------------- [Tutorial] HTC Reference ---- CreateEventObject Method
CreateEventObject method ------------------------------------------------------------------------------------------------------------ -------------------------------------- Create an event object, when you need to pass the event additional information PUBLIC: The fire method of the EVENT element is used. Format OEvent = Element.createEventObject ()
The return value returns an EVENT object.
Remarks The same EVENT object cannot be reused when the Fire method is called multiple times.
Sample ms-help: //ms.msdnqtr.2003apr.1033/Behavior/Workshop/components/htc/reference/Methods/createEventObject.htm ------------------------------------------------------------------------------ -------------------------------------------------- ---------------- [Tutorial] HTC Reference ---- ONCONTENTREADY event
OnContentReady event ------------------------------------------------------------------------------------------------------------- -------------------------------------- The content of the elements connected to the behavior is completely analyzed. .
Format
Attribute Event is required. Specifies a dynamic HTML (DHTML) event, or any string of the HTML component (HTC) specified by the HTML component (HTC) in the HTC reference. For options. Specifies a string in the following value to identify the event source. Document references the Document object. ELEMENT default. Reference elements of behavior connection. WINDOW references to the Window object. ID is optional. The unique identifier string of the PUBLIC: Attach element in the component. This property is similar to the id attribute in DHTML. Onevent must be selected. Direct declaration of the event handler or specified string of the in-line script.
Remarks InnerHTML attributes of this element may not return the correct value before the event occurs. When the event occurs and the LITERALCONTENT attribute of the public: Component element is true, the text content of the element behavior has been stored in the InnerHTML property. This event pointed out that element behavior can access the InnerHTML property. Because this event is only valid for the HTC component, the only way to bind the OnContentReady event is to use the public: attach element. Attachevent cannot bind this event because only the standard DHTML event works. When a HTC file is implemented as a ViewLink implementation, an onContentReady event, or any other HTC-specific event, it is impossible to connect to an element in the document segment. For an overall view of the event incident in a HTC file and its main document initialization, see the component initialization.
Sample ms-help: //ms.msdnqtr.2003apr.1033/Behavior/Workshop/components/htc/reference/events/oncontentready.htm -------------------- -------------------------------------------------- ---------------- [Tutorial] HTC Reference ---- OnContentsave Event
OnContentSave event ---------------------------------------------------------------------------------------------- -------------------------------------- Connected to an element of an element of an elemental behavior Before saving or replication.
Format