Hosting Scriptlets in Web Pages

Once we have created our first functional scriptlet, it's time to discuss how to embed it in a host HTML page. At the moment there's just one way to do it: using the same tag—

<OBJECT>
—which is used for ActiveX controls. This is all a bit confusing for some non-updated tools, like FrontPage 97, that know how to treat ActiveX controls but remain baffled by scriptlets.

FrontPage Express and FrontPage 97 are deceived by the

<OBJECT>
tag. They attempt to read the control's properties as usual with ActiveX controls, but this time unsuccessfully.

Thus, with these authoring tools you cannot edit properties at design-time and, instead, must resort to run-time script code to get the scriptlet to work the way you want. Fortunately, both are quite robust and no system errors appear. If you're using FrontPage 98, however, all this disappears.

A similar problem arises for script code to automate the scriptlet inside the page. ScriptWizard fails to detect scriptlets. ScriptWizard is the utility included both in FrontPage and ActiveX Control Pad to help you write script code.

In conclusion, if you want to embed a scriptlet in an HTML page, then do it manually!

© 1997 by Wrox Press. All rights reserved.