Beyond HTML: Tools for Interactivity


Tool #1: JavaScript

JavaScript is a scripting language for the Internet. It was first known as LiveScript, until Sun Microsystems came out with Java. After the introduction of Java, Netscape and Sun Microsystems got together and renamed LiveScript as JavaScript.

JavaScript is interpreted on the client side.  It utilizes elements that already exist in a web page, like links, images, and forms. The user interacts with these elements and JavaScript provides a reaction to the user’s input or action, resulting in meaningful interaction between a web page and a user. JavaScript definitions are embedded within the <head></head> tags in an HTML document.  It is comparatively easy to script, even easier to borrow from other web pages, and simple to invoke in a web editor.


Alternative Tool

A competing product with essentially the same functionality that is designed for the Microsoft environment is VBScript. We’ll discuss JavaScript here, but keep in mind that people who use FrontPage and design for Internet Explorer use VBScript. VBScript browser support is designed for IE 4.0 and higher.


Browser Support


What can JavaScript do?

JavaScript offers a way to add interactivity to Web pages.

  1. Use forms for dynamic navigation

    Example: jump to page on dropdown selection
    http://www.healthsystem.virginia.edu/home.html

    Example: changing the target of a link based on a dropdown selection
    http://www.itc.virginia.edu/atg/software/javascript/change-link.html

    Example--multi-dropdown navigation - select art - visual art then click Jump!
    http://xroads.virginia.edu/~CAP/newnav/jindx3.html

  2. Add interactivity to graphics

    Example: rollovers (also known as “mouseovers”):
    http://www.virginia.edu/

  3. Provide client-side form validation

    Example: Strict form validation
    http://www.quirksmode.org/js/formex.html

Pitfalls


Effect on Users’ System Performance


JavaScript Resources

  1. Learn to create Rollovers and other simple to complex JavaScript actions in Dreamweaver and Fireworks, no knowledge of scripting required. Search the Offered Courses at the Division of Training site for ITC’s Dreamweaver Advanced Course and ITC’s Fireworks Advanced Course.

  2. Get an introduction to JavaScript with EchoEcho.com's tutorial and complete reference:
    http://www.echoecho.com/javascript.htm


Go on to Tool #2: DHTML

 

Introduction | Tool Types
JavaScript | DHTML | CGI/Perl | Cold Fusion | Java