Fire-House 58

Objects

media

o-5


JavaScript:
firehouse58.com  

 

Hard Reload
To See Menu

Applet Object

Area Object

document.applet

used to access applets.

compatible: JavaScript 1.1

document.area

used to access image maps.

compatible: JavaScript 1.1

 

Image Object

Mime Type Object

document.image

used to access images.

compatible: JavaScript 1.1

navigator.mimeType

used to access the browsers supported mime types.

compatible: Netscape Navigator

 

Plug-in Object

  
navigator.plugin

used to access the browsers supported plug-ins.

compatible: Netscape Navigator

 

 


 
 
 

Java Applet

 


<applet name="Dizzer" code="Dizzer.class"
alt="JAVA Applet"
width="400" height="50"
codebase="../common/class/" align="left">
<param name="FontFace" value="Arial">
<param name="Size" value="30">
<param name="Text" value="Applet Object">
</applet>

This is the Java applet Dizzer.class, or
document.applet[0]. JavaScript can access the property name. The parameter / value pairs are not scriptable.

     
<form name="AppForm">
<input type="button" name="AppBttn"
value=".stop() Applet" onClick="AppControl()">
</form>

<script language="JavaScript">
<!--

The form AppForm contains one button object, AppBttn, which acts as a toggle on/off switch for the Applet.      
function AppControl() {
App = document.applets[0]
bttn = document.AppForm.AppBttn

AppControl defines two variables, App (the applet) & bttn(the toggle).      
bttn.value = ( bttn.value == ".stop()" ) ? ".start()": ".stop()"


if ( bttn.value != ".stop()" ) { App.stop() }
                                  else      { App.start() }}
// -->
</script>
The bttn.value is checked & reset using a the conditional control structure. Then checked again to invoke the Applet methods start() & stop().

[back]   [home]   [next]