An Introduction to JavaScript
JavaScript is an object oriented scripting language, which, as far as I can tell, means a language with programming objects that have methods and properties attached to them when properly defined. WHAT DOES THAT MEAN? Let's just ignore all the technojargon for now, because to the average HTML hacker (with no other programming experience) it has no meaning. There are many JavaScript documentation sites and archives of working javaScript examples on the Web. I'm assuming if your reading this introduction you are new to Javascript. The main thing for the beginner to keep in mind is that JavaScript has a logic and a functional way to deal with different aspects of the browser and now through LiveWire the server. JavaScript also allows you to interact programmatically through LiveConnect with plug-ins and Java applets. JavaScript was introduced by Netscape with the release of Navigator 2.0 ,and developed jointly with Sun Microsystems. The beauty of JavaScript, in Netscape and MSIE 3.0 is, MOST OF THE OBJECTS you need for simple scripting ARE ALREADY DEFINED. By using these predefined objects and a few simple Javascript statements you can :

Add "real" back and forward buttons or graphics on a page.

Monitor form input and give feedback interactively.

Create simple animation and manipulate images and sounds

Password protect individual pages.

Create pop-up messages and windows within a page.
You can do many things that previously required a CGI script running on the server. This does two things: it frees up the server fom CGI calls and you to create effects without needing to rely on the server/your ISP. This is a woderful thing if you think about it. You get to use the power of the machine that has the client/browser running. The Internet is getting congested as it is; anything you can do to keep the load off the servers will help all of us.
Javascript runs on Netscape 2.0 and higher and MSIE 3.0 and higher(?). I'm sure it will carried over into Communicator 4.0 and Whatever Microsoft Callsit 4.0. In that light, it is worth knowing something about. It is not nearly as complex or demanding as Java, but related somewhat in how it handles certain things(objects). JavaScript will make your Webpage more interactive and entertaining. Let's look at a couple of pages and what they've done with JavaScript.
You may want to load these links outside of the current frameset, which makes it easier to view and save (look at the source offline).
- Glub TV itself might be a little slow, but it has some pretty active buttons and menu items.
- Would you like to hear What the JavaCows have to say about the whole thing?
- Gerry Manacsa (on AOL yet) uses a couple of simple JavaScript eventhandlers to communicate a lot on his homepage.
- Here is an example of how to Valid8 form data and alert the user of possible omissions or errors.
- Handy buttons are the norm at Mr. Tanega's page.
- Achille Hui's Background Selector shows what can be done with frames and forms.
- Template Studio has it all and you can download the whole site for your edification!
This gives you an idea of what JavaScript is being used for on the Web. Hopefully, this will encourage all of you to add a little spice to your pages. There are many tutorials, archives and JavaScript sites to learn the necessary knowledge. Try the Content links on the left for a starting place. Then, START ADDING A FEW JAVASCRIPTS TO YOUR HTML.
Please, send any additions or suggestions to Doug Bennett.