Windows® Script Components provide a lightweight, easily maintainable way to create components for implementing DHTML Behaviors available in Microsoft® Internet Explorer 5.0. Using a script component allows script developers to implement behaviors using Microsoft® Visual Basic® Scripting Edition (VBScript), Microsoft® JScript® (ECMAScript), or any third party scripting language that supports the Microsoft® ActiveX® Scripting interfaces.
Benefits of Creating Behavior Script Components
For general information about DHTML Behaviors, see http://msdn.microsoft.com/workshop.
By creating Behavior script components, you can:
Expose behaviors by binding functions in the script component to events raised in the containing document, either for specific elements or for the DHTML document or DHTML window objects.
Define layouts, which contain HTML text that is inserted into the containing document when the behavior is called.
Expose custom properties and methods that extend the set of members for an element in the containing page.
Expose custom events which the script component can fire at any time. For example, a script component can fire a custom event after changing the contents of a DHTML element on the page.
Bind a script component function to certain standard events such as when the document is loaded or when the content of the element changes.
In this section you will find information about the following:
Creating a Behavior Script Component See what elements to put into a Behavior script component file, how to share information with the containing document, what DHTML features apply to Behavior script components, and what to watch for when scripting.
Exposing Properties and Methods in Behavior Script Components Create properties and methods that extend those already available in DHTML elements.
Exposing Custom Events in Behavior Script Components Expose and fire events from the script component to the containing document.
Behavior Handler Reference A list of XML elements, properties, and methods used in Behavior script components.