Applet object (Object/HTML)

An object representing an HTML <APPLET> tag.

Availability:

DOM level - 0
JavaScript - 1.1
JScript - 3.0
Internet Explorer - 4.0
Netscape - 3.0
Opera - 3.0
Deprecated - HTML 4.0, DOM level 1
Inherits from:Element object
JavaScript syntax:-myApplet = aName
-myApplet = myAppletArray[aName]
-myApplet = myAppletArray[anIndex]
IEmyApplet = myDocument.all.anElementID
IEmyApplet = myDocument.all.tags("APPLET")[anIndex]
IEmyApplet = myDocument.all[aName]
-myApplet = myDocument.aName
-myApplet = myDocument.applets[aName]
-myApplet = myDocument.applets[anIndex]
-myApplet = myDocument.getElementById(anElementID)
-myApplet = myDocument.getElementsByName(aName)[anIndex]
-myApplet = myDocument.getElementsByTagName("APPLET")[anIndex]
HTML syntax:<APPLET> ... </APPLET>
Argument list:aNameThe name of an applet
anIndexAn element in the applets collection
anElementIDThe ID value of an Element object
Object properties:accessKey, align, alt, altHTML, archive, code, codeBase, dataFld, dataSrc, form, height, hspace, name, object, src, tabIndex, vspace, width
Object methods:start(), stop()
Event handlers:onAfterUpdate, onBeforeUpdate, onBlur, onClick, onDataAvailable, onDataSetChanged, onDataSetComplete, onDblClick, onErrorUpdate, onFocus, onHelp, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onReadyStateChange, onResize, onRowEnter, onRowExit

The properties and methods of an Applet object are inherited from the public properties and methods of the Java object it represents. However, in addition to these, MSIE also supports some additional properties.

The Java applet itself is the concrete object whose properties are accessed.

In Netscape, Applets are encapsulated as instances of the JavaObject class and communicate by means of the LiveConnect support. The mechanisms are quire different in MSIE, which uses ActiveX facilities to access applets.

When you access an Applet (JavaObject) object, you are really interacting with the Java applet itself.

The publicly accessible properties and methods depend on the applet, although all applets must support the start() and stop() methods.

It is generally safer to interact with methods that you have provided as custom additions to the applet, rather than hope that the applet supports any particular methods.

Because Java is so much more strongly data typed than JavaScript, you must be careful with the kind of values you try and send to and receive from a Java applet. Java will also not forgive the omission of an argument. In JavaScript, all arguments are assumed to be optional as a general rule, although leaving them out will have strange side effects sometimes. Java will not allow you to do this and a run time error will be generated if the arguments are not complete and all of the correct type.

In Netscape, you can build an enumerator loop to examine all the properties of an Applet object. Enumerating applet interfaces like this will yield a long list of function objects. Each function object represents an accessor for internal properties of the Java environment. Your applet may publish additional properties. With these functions, you can enquire about certain attributes of the applet and can change some of them from the script. Refer to the JavaObject topic for details about these generic capabilities, but bear in mind they only work in Netscape.

In MSIE, the APPLET object inherits its behavior from the Element object. Refer to the topic covering that for its generic properties and methods. MSIE supports many other properties and methods that are not generally available to Element objects and these are detailed here as properties and methods of the Applet object.

Warnings:

See also:ActiveX, Applet.start(), Applet.stop(), AppletArray object, Document.applets[], Element object, Input.accessKey, JavaObject object, LiveConnect

PropertyJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
accessKey1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a0 0 n/a n/aWarning , Deprecated
align1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/a-
alt1.5 1.55.0 5.06.0 6.05.0 5.0 n/a n/a n/a1 1 n/a n/a-
altHTML n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
archive1.1 1.15.0 5.03.0 3.05.0 5.0 n/a n/a n/a1 1 n/a n/a-
code1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/aReadOnly
codeBase1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/aReadOnly
dataFld1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a0 0 n/a n/aWarning , Deprecated
dataSrc1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a0 0 n/a n/aWarning , Deprecated
form1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a0 0 n/a n/aWarning , Deprecated
height1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/aReadOnly
hspace1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/a-
name1.5 1.53.0 3.03.0 3.04.0 4.0 n/a n/a n/a1 1 n/a n/aReadOnly
object1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/a-
src n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/aReadOnly
tabIndex1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a0 0 n/a n/aWarning , Deprecated
vspace1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/a-
width1.5 1.53.0 3.06.0 6.04.0 4.0 n/a n/a n/a1 1 n/a n/aReadOnly

MethodJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
start()1.1 1.13.0 3.03.0 3.04.0 4.0 n/a n/a n/a n/a n/a n/a-
stop()1.1 1.13.0 3.03.0 3.04.0 4.0 n/a n/a n/a n/a n/a n/a-

Event nameJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
onAfterUpdate n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onBeforeUpdate n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onBlur1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a n/a n/a n/aWarning
onClick1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onDataAvailable n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onDataSetChanged n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onDataSetComplete n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onDblClick1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onErrorUpdate n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onFocus1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a n/a n/a n/aWarning
onHelp n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/aWarning
onKeyDown1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onKeyPress1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onKeyUp1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onLoad1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a n/a n/a n/aWarning
onMouseDown1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onMouseMove1.2 1.23.0 3.04.0 4.04.0 4.0 n/a n/a n/a n/a n/a4.0 4.0Warning
onMouseOut1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onMouseOver1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onMouseUp1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onReadyStateChange n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onResize1.2 1.23.0 3.04.0 4.04.0 4.0 n/a n/a n/a n/a n/a n/aWarning
onRowEnter n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
onRowExit n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-

Inheritance chain:

Element object, Node object