METHOD Element
Defines a method of the HTML Component (HTC) to be exposed to the containing document.
Syntax
<PUBLIC:METHOD NAME = sName INTERNALNAME = sInternalName ID = sID />
Attributes
- NAME
- 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.
- INTERNALNAME
- 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.
- ID
- Optional. String that uniquely identifies the METHOD element within the component. This attribute is analogous to the ID attribute in Dynamic HTML (DHTML).
Element Information
Number of occurrences Any number Parent elements COMPONENT Child elements None Requires closing tag No
Remarks
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.
Example
This example uses the METHOD tag to expose the startFlying() method from the HTC to the containing document.
<PUBLIC:METHOD NAME="startFlying" /> <SCRIPT LANGUAGE="JScript" > function startFlying() { // insert flying code here } </SCRIPT>
See Also
dhtml behaviors, implementing dhtml behaviors in script, EVENT, PROPERTY
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.