Introduction to JavaScript
Randy Shull


What is JavaScript?

JavaScript is an interpreted language for creating client-side executable programs.

JavaScript programs control the browser, interact with the user, and dynamically create HTML content.

JavaScript is not a simplified version of Java. (The similiarity in name is a marketing ploy.) In fact, JavaScript is not simple at all.

 

What can JavaScript Do for Me?

Control frames and windows

Verify Forms

Provide climate control

Dynamic buttons and image maps

Image rollovers

Slide Shows

Random Pictures

DHTML butterflies and tool tips.

 

Cautionary Tales

Frames are can be confusing, especially when coupled with JavaScript.

JavaScript is not standardized and can be unsafe! For example, dynamic images fail on Netscape versions < 3 and IE versions < 4. Worse, Some recent features crash older versions. (Netscape 2.02 was the college standard and lives still.)

The situation is even worse with DHTML.

Test, test, test -- different browsers, different versions, different machines, different users. When in doubt, leave it out.

JavaScript has limited access to the client and the client's computer. Limited, but possibly invasive. Respect the clients' privacy. Besides, some folks won't accept our Cookies.

Be aware of the problems with machine generated code.

 

Where to Learn More

JavaScript for the World Wide Web by Tom Negrino and Dori Smith.
A
Peachpit Press Visual Quickstart Guide with lots of simple examples. Nice introduction to JavaScript for the JavaScript programmer.

JavaScript: The Definitive Guide by David Flanagan, published by O'Reilly. Title says it all.

Netscape JavaScript Guide http://developer.netscape.com/docs/manuals/communicator/jsguide4/index.htm. Language basics, definitions and explanations of the concepts used in JavaScript.

Netscape JavaScript Reference http://developer.netscape.com/docs/manuals/communicator/jsref/index.htm.

Randy Shull
Created June 7, 2000
Modified June 15, 2001 Expires Aug 1, 2001