Applet
Includes a Java applet in a web page.Created by
The HTMLAPPLET tag. The JavaScript runtime engine creates an Applet object corresponding to each applet in your document. It puts these objects in an array in the document.applets property. You access an Applet object by indexing this array.
To define an applet, use standard HTML syntax. If you specify the NAME attribute, you can use the value of that attribute to index into the applets array. To refer to an applet in JavaScript, you must supply the MAYSCRIPT attribute in its definition.
Description
The author of an HTML page must permit an applet to access JavaScript by specifying theMAYSCRIPT attribute of the APPLET tag. This prevents an applet from accessing JavaScript on a page without the knowledge of the page author. For example, to allow the musicPicker.class applet access to JavaScript on your page, specify the following:
<APPLET CODE="musicPicker.class" WIDTH=200 HEIGHT=35Accessing JavaScript when the
NAME="musicApp" MAYSCRIPT>
MAYSCRIPT attribute is not specified results in an exception.
For more information on using applets, see the LiveConnect information in the Client-Side JavaScript Guide.
Property Summary
TheApplet object inherits all public properties of the Java applet.
Method Summary
TheApplet object inherits all public methods of the Java applet.
Examples
The following code launches an applet calledmusicApp:
<APPLET CODE="musicSelect.class" WIDTH=200 HEIGHT=35For more examples, see the LiveConnect information in the Client-Side JavaScript Guide.
NAME="musicApp" MAYSCRIPT>
</APPLET>
See also
MimeType, Plugin
Table of Contents | Previous | Next | Index
Last Updated: 05/28/99 11:58:59
