Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes > Applets > <APPLET ...>

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:

<APPLET ARCHIVE="..."> >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com