Before we start, let's get it straight
that JAVA and JavaScript are NOT the same and the names are not interchangeable.
- JAVA is a full-blown computer language (like C++)
whose claim to fame is that it can be read by many different computer
platforms so that programmers do not need to recode the program for
each platform. As a matter of fact the last few releases of the Corel
suite were programmed entirely in JAVA.
- JavaScript, on the other hand, is just a little
bitty scripting language that is used ONLY on the Web. You can't do
anything else with it but jazz up Web pages.
True, both are used on the Web, but JAVA code (applets)
reside on the host server, while JavaScript code is embedded in the
HTML code. This means that Web surfers looking at the source code can't
see the JAVA code, while the JavaScript code is right there, and anyone
who wants to can copy it.
-
Small Java programs (called "Applets"), allow
Web pages to include functions such as animations, calculators,
fancy pull-down and slide-out menus and other fancy tricks.
-
JavaScript can be used to provide interactivity,
dynamically alter objects
displayed on a Web page, and act very much as a CGI script. The
most popular JavaScript trick is to create "rollover" effects, swapping
one graphic for another as you pass your
mouse over it.
Another difference: JAVA applets are much more likely
to cause computer crashes than JavaScript and usually load rather slowly.
So, I'm not going to talk about JAVA. I am going to talk about JavaScript,
which is one of the safest ways to enhance your Web site.
Learn
by studying JavaScript examples
If you want to explore JavaScript, take a look at
some examples
that illustrate what can be done with JavaScript. If you understand
the fundamentals of JavaScript, you can copy code from one of these
sites and adapt it to your needs.
Tutorials
JavaScript is easy to learn - if you're clever at
that sort of thing. Check out these free tutorials can give it a try.
If you're only interested in JavaScript to create
rollovers for your Web site, you'll be glad to know that HTML editors
such as Dreamweaver and GoLive and some graphic programs such as Fireworks
and ImageReady will create the rollover JavaScript for you.
Free code
There is an abundance of free JavaScript code
available on the Web. Caution: Before you adopt any of
these scripts for your own use, please read all the developers' comments.
You'll want to avoid scripts that work only in certain browsers. Visit
these sites for free JavaScript code:
Webmonkey's
JavaScript code library
Earthweb
JavaScripts
The JavaScript
Source
The
JavaScript Planet
JavaScript
Kit
|