JavaScript Applets

In this tutorial we will see the existing types of JavaScript Applets and discuss how to modify them.


What type of JavaScript Applets are there?

  • Business and Finance: financial functions, inventory management, sales, and other business applications.
  • Multimedia: animation, simulation, graphics.
  • Images: a variety of tools to create and manipulate images, imagemaps, geographical maps, etc.
  • Search Engines: scripts that let you search the main search engines together, or create local search of your pages and directories.
  • Utilities: calculators, counters, HTML and Web tools, date and time applications, etc.
  • Games: the fun stuff, like pacman,chess, arcadia games, etc.

  • General: other applications.
  • A JavaScript that any framed page should not be without is a very simple one, which forces the page to open in the full window, not in a frame, as shown below:

    <SCRIPT LANGUAGE= "JavaScript">
    <!--
    if (top.location != location) top.location.href = location.href;
    //-->
    </SCRIPT>


Modifying JavaScript Applets

  • You should copy the script "as it is" (in text, source code mode) to the page you would like to include it.
  • To make the applet work in the new page: introduce the minimum modifications that allows it to run in the page. See also this resource.
  • You should consider changing its behavior by adding more of the same.
    For example: suppose you got a script that let a person click in one button and open a page in a new window. To create a toolbar with buttons opening different pages in a new window all that is needed to do is to add more button type elements in the form, one after the other.
  • You should consider combining different scripts in the same page.
    For example: suppose you got a script to check fields in a form and you adapted it to your form. But, you would like to provide instructions to the person filling the form. You could add the "press a button script and see a pop up window" to the page with the form validation script and you would be done.
  • Finally, if what you want cannot be acomplished by "more of the same" and combinations, try looking for analogies, examples, specially in the utilities and others type of Applets.

You can see more applets here. Of course you can also write your own applets from scratch as discussed in this tutorial on programming in JavaScript.



This page is maintained by Al Bento who can be reached at abento@ubalt.edu. Although we will attempt to keep this information accurate, we can not guarantee the accuracy of the information provided. This page was updated on May 15, 2007.