JavaScript

Java vs. JavaScript

Our Favourite Tools
Advanced Editors Price
3 Editpad $39.95
2 Namo $119.90
1 Ultra Edit $49.95

This is our choice of advanced web editors. They differ in functionality and price, and you must know your way around a bit to be able pick out the one that suits you the best. But then again, if you’re really an advanced user, you probably will.

Java is a programing language developed by Sun. Java allows programmers to create programs. One example is Java Applets, a small program embedded within a web page.

JavaScript is a scripting language developed by Netscape and later joined in a partnership with Sun. You can insert it directly to your HTML documents. Creating JavaScript is not difficult. What you need are only simple text editor and browser that supports JavaScript.

JavaScript

We are not going to show you how to write JavaScript here because useful JavaScripts are widely available for you to copy. You may not need to know how to write it unless you want customized Script for your site. If you want to learn how to write the script, try JavaScript for the world wide web book.

Shown below are some examples of useful JavaScripts and links to some JavaScript web sites

Alert message:

If you enter this page from the link on the main page, you will get an alert message. Try it again: Click here

Here is the code for the above message:

<a href="j_script.html" onclick="alert('Reload this page?');">Click here</A>

Dynamic images and menus:

Dynamic menu can either be created by JavaScript or JavaApplet. The JavaScript version will work only on Netscape 3.0 or higher. JavaApplet version should work on both Netscape and Explorer but it will run much slower than JavaScript.

JavaScript example:

>>

example of dynamic menu

The principle is that you have two images. One will be displayed when you put your mouse on it, and the other will be displayed when the mouse is off the image.

Installation is easy. This code originally written by Nick Heinle and Athenia Associates. Follow the link to get detail instruction.

Customized Message in Status Bar

To see how it works, simply put your cursor over (but don't "click") on this links and watch the status bar at the bottom of your screen.

You can get this script from "Cut-N-Paste JavaScript"

Counter:

There is no example shown here. To use this counter script, your server must support server-side includes (SSI) feature. You can get it at http://www.cris.com/~adaml/Counter.shtml. The script developed by Adam Levental.

Links to JavaScript resources:

On line JavaScript Tutorial:

Any cool sources to recommend? Please contact us