{{{{ What is JavaScript? }}}}


Description of JavaScript
How this website aims to teach JavaScript
Different browsers
Using HTML
If your JavaScript doesn't work
The JavaScript Tutorial


Description of JavaScript

JavaScript is a simple programming language which makes webpages do things. There is more complicated software which does this, such as Flash or Java applets. But JavaScript can be used without buying extra software or having to do special stuff such as compiling. (Please note - JavaScript is not Java). With JavaScript, a webpage is all you need. All the code is inside the webpage, so people don't need to wait for it to load. Anyone can list the code on the webpage and anyone can save it to use on their own computer. I'll leave it to you to decide whether this is an advantage or disadvantage!

There are disadvantages to using JavaScript. If you are used to other programming languages, you will find it very limited in what it can do. It can't draw anything directly on the screen or print things out, for example. It is a true programming language, however, and you will need programming skills to use it to do anything complicated. If you have never written a computer program, then please take things very slowly and try out each new technique as you learn it, before attempting anything complicated.

How this website aims to teach JavaScript

Most guides to JavaScript that I have seen either give a complete manual of the language, or describe how to do 'wacky' things. In both cases, it is very hard to learn the language. I will be describing the features and techniques that I use in my websites, with lots of examples, so hopefully anyone can use them in different ways to produce their own original webpages. This will cover input, output and programming logic, plus some programming tips.

Different browsers

Another complication is that there are different dialects of JavaScript for different browsers. This website uses JavaScript that will work under the main browsers (hopefully). Here are links to browser websites description of their versions of JavaScript:

Using HTML

Since JavaScript is used within HTML, you need to know how to use HTML first, and how to upload webpages to the internet. This website does not cover HTML or general webpage maintenance. If you don't know these subjects, go away and learn them first! Here are two websites which might help you, plus the official websites:

If your JavaScript doesn't work

You may need to enable JavaScript for your browser. This is done in different ways for different browsers. It may be one of the options at the top of the screen, such as 'Tools'.
There is a particular problem with Internet Explorer. Sometimes this will run JavaScript from the internet, or when it is on a server, but refuses to run it on your own computer. It may come up with an error message immediately under the main browser bars at the top of the screen about 'Active content'. It will invite you to click on the bar to allow the 'active content' (which is the JavaScript). If you fail to do this, or click on the X at the end to get rid of the message, then the JavaScript won't run. I do not understand why Microsoft thinks that your own JavaScript on your own computer is more dangerous to you than JavaScript on the internet, but there you go. You can set your browser to get rid of this annoyance. Click on 'Tools' (top of screen), then 'Internet Options', then 'Advanced'. There is a list of Settings. Scroll down to 'Security' (near the bottom of the list). one option is 'Allow active content to run in files on My Computer' and this should have a tick by it. If it doesn't, then click on the box to get a tick. Click on OK at the bottom. You will need to restart your computer before it gets actioned.



However, despite all this, I hope this website will help people who want to learn JavaScript. It is broken down into simple lessons which cover different areas. There is also an alphabetical index in case you want to look something up. So let's get started!

JavaScript Tutorial



Valid HTML 4.01!

© Jo Edkins 2005