Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  Component Development

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 it 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 Work

You use a scriptlet 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 JScript™ (compatible with ECMA 262 language specification), 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, as well as 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 at http://www.microsoft.com/workshop/default.htm.

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 which 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.


Does this content meet your programming needs? Write us!

Back to topBack to top

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

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site