Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Attribute for <APPLET ...>
NAME = "text string"

NAME gives the applet a unique name. NAME is mostly useful is you want to use JavaScript to control the applet in some way.

For example, the My Applet applet allows you to set the text of the applet with its setText() method. The following code creates an applet with the name MyApplet. The code then creates a text field where you can type some text, then a button that calls the applet's setText() method. The button calls setText() by using the name set in the <APPLET ...> tag:

<APPLET 
     CODE="MyApplet.class"
     HEIGHT=75 WIDTH=300 
     NAME="MyApplet">
<PARAM NAME=TEXT VALUE="type something in the field">
</APPLET>

<FORM>
<INPUT NAME="settext"> 
<INPUT 
  TYPE=BUTTON VALUE="set applet text" 
  onClick="document.applets['MyApplet'].setText(this.form.elements['settext'].value)">
</FORM>

which gives us this applet and form:

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire