|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
Scriptlets can initiate two kinds of events that can be received and acted on by the containing HTML document. These are onscriptletevent events and standard window events such as mouse clicks and keypresses. The onscriptletevent event includes a string and an object parameter; the external HTML document can base its action on the contents of the string and interpret the object parameters appropriately. Using Scriptlets in HTML DocumentsAfter a Scriptlet is created, including it and using it within an HTML document is a simple procedure. A Scriptlet is included in an HTML document by using the <OBJECT> tag with the following syntax: <OBJECT ID=Calendar WIDTH=400 HEIGHT=270 TYPE=text/x-scriptlet> <PARAM NAME=URL VALUE=Calendar.htm> </OBJECT> Like other Web browser objects, the ID attribute is used to name the object so that it can be accessed by scripts within the page. The WIDTH and HEIGHT attributes define the size of the object within the page. The Scriptlet <OBJECT> tags TYPE attribute uses the MIME type text/x-scriptlet to tell Internet Explorer that this object is a Scriptlet. Finally, the <PARAM> tag is used to give the URL of the Scriptlet itself. Scriptlet ExampleMicrosoft maintains a collection of samples of many of its technologies, including Dynamic HTML and Scriptlets, at http://www.microsoft.com/workshop/c.htm#/gallery/samples/default.asp. Figure 26.16 shows one of the demos from this site, the Calculator Scriptlet Demo, in action. Notice the following features of this demonstration:
Find Out More About Dynamic HTMLIt would be possible to write an entire book on Dynamic HTML, so there is no way it can be covered in the space that has been allotted here. The object of this chapter was to give you the resources for getting started with your own Web pages by using Microsofts implementation of Dynamic HTML and Internet Explorer. To see more about both Microsoft and Netscape Dynamic HTML, check out Que Publishings Special Edition, Using Dynamic HTML. If you would like to see more examples and to find out more information, try some of these links on the Microsoft Web site.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |