Defines a method of the HTML Component (HTC) to be exposed to the containing document.
ID = "sID"
INTERNALNAME = "sInternalName"
NAME = "sName"
- Optional. String that uniquely identifies the PUBLIC:METHOD element within the component. This attribute is analogous to the ID attribute in Dynamic HTML (DHTML).
- Optional. String that specifies the name by which the method is referred to within the component. If no value is specified, the NAME attribute is used by default.
- Required. String that specifies the name by which the method is referred to in the containing document. By default, the NAME specified is also used to refer to the method within the component, unless an INTERNALNAME attribute is specified.
|Minimum availability||Internet Explorer
|Minimum operating systems||
Windows 95, Windows NT 4.0|
By specifying a NAME attribute similar to a standard method name already defined for the element, a behavior can override the element's default behavior.
This example uses the PUBLIC:METHOD tag to expose the startFlying method from the HTC to the containing document.
<PUBLIC:METHOD NAME="startFlying" />
<SCRIPT LANGUAGE="JScript" >
// Insert flying code here
This example of a containing document demonstrates one way to call the method.
<BODY ID="flyingHigh" class="FLY">
<!-- Insert stuff to fly -->
Introduction to DHTML Behaviors, Using HTML Components to Implement DHTML Behaviors in Script, PUBLIC:EVENT, PUBLIC:PROPERTY