Frequently Asked Questions


 

JavaScript functions explained
JavaScript variables explained
JavaScript handlers explained
JavaScript parameters explained
A Tutorial about the rollover code
Frequently asked questions

 

 

What can JavaScript do?
JavaScript can make a web page more interactive than HTML alone. It can provide the user with feedback, for example by highlighting links with rollover images, or providing alert messages. JavaScript can store information about the users preferences in cookies, this means a customised page could be loaded when the user returns. It can detect the type and version of the web browser that a user has, and can then load an appropriate page. JavaScript can validate forms, perform calculations, and write text direct to the web page. It is a very powerful tool for the web designer, but does have its limitations.

What can't JavaScript do?
There are some things that JavaScript cannot do, this is mainly for security reasons. JavaScript cannot read and write files to users hard drives, the only exception to this is cookies, but these are subject to strict limits. Other things that JavaScript cannot do are: -
 -It cannot read or write files to the server.
 -It can't close any browser windows that it has not opened.
 -It can't read information from other web pages or cookies that came from another server.

Why do some scripts only work in certain browsers?
This is because JavaScript was developed by Netscape. When Microsoft decided to add scripting capabilities to Internet Explorer, instead of using JavaScript, they chose to develop their own similar language called Jscript. The differences between the two scripts mean that some scripts will run on one browser but not the other.

Is JavaScript the same as Java?
No. One is a full cross-platform programming language capable of producing stand-alone applications, the other is a scripting language for web browsers.

What is the best editor to use for writing JavaScript?
You can use any text editor such as Notepad. Word processors can be used but the files must be saved as plain text. Some of the WYSIWYG editors such as Dreamweaver are excellent and provide colour coding to the script, as long as you use the 'code view' option.