Click to return to the Component Development home page    
Welcome to Scriptlet Tech...    
Web Workshop  |  Component Development

Designing a Scriptlet


A scriptlet is simply a DHTML page that uses certain conventions to define its properties, methods, and events.

To define the page as a scriptlet:

Using a public_description object has several advantages. You can use any names for variables and functions that you want to expose as properties and methods because you assign them public names in the public_description object. In addition, using the public_description object provides you with a convenient way to summarize and document the properties and methods that the scriptlet exposes.

In contrast, if you use the default interface descriptions, you must use the public_ prefix on any name that you want to expose. If a scriptlet already happens to have a variable or function with the public_ prefix, it will always be exposed, whether you want it to be or not.

When you create the properties, methods, and events for the scriptlet, you can make full use of the DHTML Object Model to display text, animate HTML elements, change colors, or define any other behavior that you want the control to have.

You can also use extensions to the DHTML Object Model that are available as part of the window.external object, which is unique to scriptlets. For a summary of the extensions, see Scriptlet Model Extensions.

Note You can determine from within the .htm file whether it is being used as a scriptlet or simply as a standalone Web page. For details, see the version property.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.