Introduction

Today, virtually every major website uses JavaScript, also called ECMAScript, to enhance the functionality of HTML pages. Image-switching buttons, e-commerce shopping carts, forms processing functions, even the new Flash and Shockwave movies, require the use of JavaScript programs. To one degree or another, every web designer today MUST be able to use JavaScript, even if it is only to repurpose someone else's code into a new website.

Because almost every site today uses JavaScript, it is important that YOU possess at least a rudimentary knowledge of JavaScript and the fundamentals of computer programming as they apply to JavaScript.

Many of the JavaScript scripts used in today's websites are fairly simple; this is not likely to remain true for long, however, as many cutting-edge technologies (Dynamic HTML, Flash, and others) rely on JavaScript programming to unlock their full potential. Unfortunately, not everyone can really learn to program successfully; if everyone could do it, companies wouldn't pay programmers such huge sums of money. Still, you must learn at least a little JavaScript in order to survive in today's competitive Internet marketplace.

In the next two modules, I will endeavor to explain the concepts behind JavaScript and programming in general. These two modules are not intended to substitute for a full-length programming class; instead, they should introduce you to JavaScript programming concepts enough to get you prepared for more in-depth course work. My experience with programming has taught me that, the more times students hear programming concepts explained, the easier it is for them to understand and assimilate those concepts.

For this HTML online class, you are NOT required to put any JavaScript elements into your final project; the forthcoming discussion of programming concepts in JavaScript is for YOUR benefit only. Even though none of this information is required for your grade, however, I strongly urge you to familiarize yourself with the programming and JavaScript concepts that I will present to you. Of course, if you WANT to add JavaScript elements to your final project, I would be happy to see them (as long as they make sense in context of your site)!

We are now, for the most part, leaving behind the world of HTML and entering a more complex, more technical, environment which I will do my best to de-mystify and explain. I will, in fact, be giving you as much detail as I can without obscuring the meaning of my explanations. I suspect that you will want to read through all of the sections in this module, then do the exercises along with me at the end of the module; once you've done that, you'll probably want to review all of the sections a couple more times, since I think they'll make more sense to you after you've done a little hands-on programming yourself. The next two modules are intended both as an introduction to programming, and as an explanatory reference for certain key aspects of JavaScript.

Oh, here's one last note. If you are seriously interested in JavaScript, there is one essential book which you must purchase: "JavaScript: The Definitive Guide" by David Flanagan, O'Reilly and Associates, Publisher. This book is THE JavaScript reference book for programmers, and is both comprehensive and well written; you'll find it an indispensible resource for information about the language. This book is available from my bookstore, http://www.michaelmasumoto.com/bookstore/. You'll find it very difficult to work in JavaScript without a copy of this book, as JavaScript is both enormous and filled with arcane details; I refer to my copy of it pretty much all of the time. This book is REQUIRED if you wish to complete the next two modules. Netscape, the developer of JavaScript, also has technical specification documents on JavaScript available as PDF and HTML files from their website at http://developer.netscape.com/; these are another very important reference for you, although be warned that these documents, though illuminating and useful, are long, dense, and technical.

Main Menu