Introduction


Is the Type Too Small?

If the type in this book is too small for your comfortable reading, simply reset your browser font and font size specifications. Under "Options" at the top of your screen, select "General Preferences..." and then click on "Fonts". Select a proportional font with a newspaper/book style (serif) type such as Times, Bookman, Palatino, Century, etc. Set the font size to 12 or 14.

If you do not like the light book cover background, simply click the "Background" button to change it to white.


Note from the Author:

If you want to learn to speak in Geek-Squeak, that is, the language of "objects", "properties", "methods" and similar C++ programming talk, you've got the wrong book.

On the other hand, if you just want to be able to do some stuff with JavaScript, this little book may help you implement the things that you want to happen at your web site.

You probably have very little time and darned little patience with documentation, if you're like me.

So there won't be any "tests" and other stuff at the end of chapters to mess with your head.

My notion about scripting is simple: I don't care a whit about the beauty of the underlying foundations. Nor how smart the folks were who crafted the language. I just want a script to do something.

How it does it is for others to marvel at. If I can make it send today's date and time to screen, for example, I'm plumb tickled.

That it uses milliseconds since the first instant of the first month of the year 1970 doesn't seem to make an iota of difference to me, to the script, or the visitor to my pages.

So this tutorial will concentrate on teaching you to do things. Fancy names ain't gonna help that process. Some concrete examples, on the other hand, might.

JavaScript ain't as hard as folks who can do it would have you believe.

A cookbook for JavaScript may be a better way of looking at this particular text. My assumption is that you don't have much time (or inclination) to get into the esoterics.

If you had wanted to go to school to learn it, you wouldn't be looking at this book anyhow -- you'd be in a class somewhere.

And if you had wanted a really great textbook for JavaScript, you would have bought an expensive 30 or 40 buck tome from one of the big publishers instead of buying this "online cheapie"!

How to Use This Book

After you have cruised through the first couple chapters, you will have covered the elemental basics you need for scripting.

Once you have those under your belt, you don't need to continue reading chapters in any particular order.

For example, if you want to cobble together a clock or calendar, go ahead and jump to that chapter. Or if you want to mess with some sound files, skip to that chapter.

As much as possible, each chapter should stand on its own, not relying upon prior chapters' materials. Or at least that was the general idea. (I'm old and my mind wanders sometimes, you see)

When you see a script (shown in blue) on a page in this book that you want to paste into your HTML, or just want to see in action, click on the link on that page.

That action will open a new window over this screen that'll provide your demonstration.

When you've found a routine you want to use in your own script, you won't have to type it. Simply scroll down that examples page to find an Ugly JavaScript Copy-N-Paste Window with the routine you want handy for copying and pasting right into your own HTML.

JavaScript is constantly evolving as the folks at Netscape® keep improving and and adding new features to this client-side processing language.

So there may be new features of JavaScript not included in this text. You can keep up with those at Netscape's® web site.

JavaScript and LiveScript

JavaScript used to be called "Live Script". It was developed by the folks at Netscape®.

At this time, only Netscape Navigator® 2.x and 3.x series browsers really support JavaScript.

The scripts in this book are written for the most part to be Netscape 3.x® compliant, since that's where it's at today.

If you keep up with tech on the Web, you might just believe that Microsoft Internet Explorer® also supports JavaScript. That is not exactly true, at least not in general. (Some of the functions of Navigator® 2.x are supported, but certainly not even all of those)

In the near future, MIE® will probably have a release that does support all of JavaScript. It is apparent that Microsoft's® programmers are working very hard to catch up -- not just to Netscape®, but to the folks in their own marketing and hype departments.


© Copyright 1997, John H. Keyes john.keyes@intellink.net