Microsoft Scriptlet TechnologyMicrosoft Scriptlet Technology*
*Contents  *Index  *Topic Contents

Scriptlets Overview

A scriptlet is a Web page based on Dynamic HTML (DHTML) that you can use as a control in any application that supports controls. The scriptlet is a complete Web-ready .htm file, but includes information that allows you to work with it as a control — you can get and set its properties, call its methods, and so on.

Scriptlets:

For example, with scriptlets you can:

How Scriptlets Works

You use scriptlets like a standard control. In the scriptlet, you create any properties, methods, or events that you want by simply creating scripts in common active scripting languages such as JavaScript, Visual Basic Scripting Edition (VBScript), or another language. The scripts rely on the scripting capabilities of DHTML, which gives you a complete object model for elements on the scriptlet.

For example, a scriptlet might be a Web page that contains animation based on DHTML that moves and resizes text on the page. You can write scripts to expose properties that allow another application to set the text, speed, and direction of the animation text, and methods that allow another application to start, stop, and pause the animation.

Note   To learn more about using Dynamic HTML in your Web pages, you can view the documentation for the Internet Client SDK located here.

Support for scriptlets is built into Internet Explorer 4.0. You can use the standard OBJECT tag to insert and work with scriptlets as you do any other object on a Web page.

To use the scriptlet in applications that support ActiveX controls, you use a control called the scriptlet container object, which hosts the scriptlet. The host application, such as Visual Basic, uses the scriptlet container object to create a window for the scriptlet and provide a way for the host application to specify what scriptlet to use, where it displays, at what size, and so on. The scriptlet container object also provides the interface for you to set and get the scriptlet's properties, call its methods, and respond to its events.

Scriptlet Security

In a security-aware host application such as Internet Explorer, the scriptlet and any controls contained within it are subject to Internet Explorer 4.0 security. For information about security settings in Internet Explorer 4.0, see Internet Explorer Help.

Typically, the security settings for the zone containing the scriptlet's server must be Medium or Low. If the setting is High, the scriptlet will not download to your computer. If you usually set custom security settings for a zone, set both Script ActiveX controls marked safe for scripting and Initialize and script ActiveX controls not marked as safe to either Prompt or Enable.

The same applies to any controls that the scriptlet contains, including other scriptlets, especially if the scriptlet contains controls that reside on a server in a different zone.

When you distribute an application that uses a scriptlet, make sure that users set the security settings in their copy of Internet Explorer to the correct level to allow them to use your scriptlets.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.