Basics

Scripts

JS Links







































The HTML Writers Guild


Email Sunshine



JavaScript for Beginners!

Introduction

The nice thing about JavaScript is the simplicity of it's use. But there is the danger of using "too much" JavaScript. JavaScript was created to enhance a webpage but not the content. JavaScripts should be used to perform a function, not just to "entertain" your viewers.

Examples:

  • To perform functions HTML cannot do
  • To add content to the site
  • To gain information about a viewer (useful information only)
  • To make two frames change with the click of one button

Don't Use JavaScript:

  • Just to amuse or entertain the viewers
  • To obtain information about viewers that serves no purpose (such as asking for their name and displaying it on the page)

I'm sure you understand what I'm trying to say by now. Most viewers don't visit your site to see all the little bells and whistles you can cram in - they've already seen these many times. They're looking for content. JavaScript that adds or helps to display the content of a page works well, but JavaScript that trys to be the content do not. Also, there are still many viewers surfing the internet who don't have JavaScript enabled browsers and I'm sure it's annoying to see JavaScript that isn't hidden from the older browsers. The bottom line is - JavaScript is a powerful weapon, and can destroy the content of your site without your knowledge, so please be careful using it.

What is JavaScript

JavaScript can be thought of as an extension to HTML which allows authors to incorporate some functionality in their web pages. So now, whenever the user presses the SUBMIT button, you don't necessarily have to invoke a cgi script to do the processing. If it is something simple, you can do the processing locally using JavaScript and give back the results. JavaScript can also be used in a number of ways to enhance your page.

Who This Tutorial is For

In its present form, this Guide is for the absolute beginner to JavaScript. Prerequisite knowledge of HTML is required. I have just started learning JavaScript and this page is my way of continuing my learning process.

So please, if you're one of those JavaScript experts out there be kind enough to Email Me if you find errors or misinformation.

The BASICS page contains some very simple but useful scripts along with explanations. You can use them without knowing much about JavaScript.

On the SCRIPTS page, the code is somewhat longer If you have problems with any of these scripts please email me.