Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1
11.10 JavaScript^449

Free Java Applet Resources

Now that you are familiar with applets, you may be wondering how to write them. The
organization that developed the Java programming language, Sun Microsystems, offers
documentation and other resources on their Web site at http://java.sun.com. Be aware that
the Java programming language is very powerful, but quite complex. There are many
resources for free and commercial Java applets on the Web. Here are a few helpful sites:
● http://www.appletcollection.com
● http://www.javaonthebrain.com
● http://www.echoecho.com/freeapplets.htm

As you visit these and other Java resource sites, keep in mind that some Java applets are
copyrighted. Be sure to obtain permission from the creator of the applet before using it on
your site. There may be some requirements for giving credit to the creator either by name
or by linking to their Web site. Follow the instructions provided with the applet. Some
applets are free to use in personal Web sites but require licenses for commercial use.

FAQ


Why do we still use the <applet>tag if it is deprecated?

Although the applet tag is deprecated, it is better-supported in commonly used browsers than
the<object>tag. An example of using the <object>tag to display a Java applet is shown
below:
<object codetype="application/java" classid="fader26.class"
width="610" height="30">
<param name="AppletHome" value="http://www.crosswinds.net/fader/" />
<param name="Data" value="mymessage.txt" />
<param name="bgColor" value="#000000" />
</object>

CHECKPOINT 11.2



  1. Describe two uses of Flash on Web pages.

  2. Describe two uses of Java applets on Web pages.

  3. Describe two disadvantages of using interactive technologies such as Flash and Java
    applets on Web pages.


11.10JavaScript

JavaScript is an object-based scripting language. In JavaScript you work with the objects
associated with a Web page document: the window, the document, and the elements such
as forms, images, and links. JavaScript, developed by Netscape, was originally called
LiveScript. When Netscape collaborated with Sun Microsystems on modifications to the
language, it was renamed JavaScript. JavaScript is not the same as the Java programming
language. Unlike Java, JavaScript cannot be used to write stand-alone programs that can
Free download pdf