|
December 22, 1999 Scriptlet Authoring Tips: December 1999
Yehuda Shiran, Ph.D.
|
|
A scriptlet is an independent script that is referenced from an HTML page. It represents an object that accepts data from the outside and supports several operations on this data. A scriptlet describes the behavior of an object and the event it is triggered by. A scriptlet also allows you to define new events. Scriptlets are supported by Internet Explorer 4.0 and up and are not supported by Netscape Navigator. Internet Explorer 5.0 added the support for Behaviors to scriptlets. A scriptlet resides in a file of its own, with extension .sct. A scriptlet file opens with a <SCRIPTLET> tag and closes with a </SCRIPTLET> tag:
A scriptlet is divided into two parts: the interface definition section and the internal implementation section. The interface definition section includes
The Automation type of the
The internal implementation section consists of a JavaScript script. This script implements the internal details of the object's methods. As seen above, only one method is defined, the
People who read this tip also read these tips: Look for similar tips by subject: |