<script>

How much is too much?

 

JavaScript is fun to do and does so many things:

  • moves images
  • checks forms
  • opens widows
  • maneuvers frames
  • tells time
  • adds messages and more. . . .

Perhaps the most challenging aspect of JavaScript is to demonstrate restraint when using features.

Features can be a significant contribution to making a page useful and appealing. For example, in The Design of Everyday Things, author Donald A. Norman stresses that it is important to give people feedback as they use an object. From that standpoint, it may be good to have what is called a "rollover", the popular feature that changes an image when you mouse over a link or particular bit of text. You can also give your audience additional information about links in the status bar, as was done on the introductory page to this unit. (Did you notice?) Features may just make the page more fun to explore.

However, features become fads very quickly—and soon taste stale. For example, the Peachpit book on JavaScript shows how to add a scrolling status bar with JavaScript and then warns "Scrolling status bars are widely considered to be a bit tasteless and a cliche these days. . . .You might thik twice before you add one of these to your sites."

   

Execution Versus Concept

It is so much fun to try out scripts and features that it can distract you from the content of your page. Jeffrey Zeldman's article about execution versus content is worthwhile reading. Before you add a JavaScript feature, decide what it does to enhance the content of your page for the audience you want to reach.

JavaScript does slow down the loading of your page. Also, there are differences between JavaScript, Microsoft's JScript and the EMCA Script that was supposed to be a standard. That means some browsers will show an error when trying to read your JavaScript. Moreover, most screen readers do not handle JavaScript, so you must be sure that essential information is available in other ways, as was done with the quiz on the unit introduction page. (The link to the quiz from the left margin works without JavaScript, while the link to the quiz in the text opens a new small window.)

   

"Complicity"

Borderequalszero

ALT T E X T

Borgstrom site

Nonetheless, there are many great effects people attempt with JavaScript. For example: see "Complicity" for an example of a project done with very plain JavaScript. Other projects at the Borderequalszero site have creative uses of JavaScript by design professionals. ALT TEXT opens small windows for stories with JavaScript. See Borgstrom.com for some very avant-guarde scripting. (On some of these sites you need to put your cursor inside the frame and right click for "view frame source" to see the JavaScript.)

Let the final word, however, be a remark I came across on the Web attributed to Plato in The Republic: "Beauty of style and harmony and grace and good rhythm depend on simplicity."

   

Copyright by dwang, 1999. All rights reserved.

Valid HTML 4.0!