shadowline
JavaScript Basics >> Variables
As you may (or may not) know, JavaScript is not JAVA. This is a common error thinking JAVA is a shortened call for JavaScript. They are actually two very different types of coding. JavaScript is an addon script that enhances the performance or interaction of a website to its visitors. JAVA is like a small mini program in itself that is self contained and does special things.

JavaScript is a "block" type language. It views commands as separate blocks of information, binds them together, then executes them. Some examples of these blocks are document, window, src, write, and status.

Properties in JavaScipt are known as EVENTS. These events cause an action to happen under certain circumstances or instances. They are based on "LOGICAL" formulas. IF this is true THEN do this command. The formulas are based on a series of comparisons.

VERY IMPORTANT ... JavaScript is VERY picky. Be sure to pay close attention to returns and spaces or the script may not work properly. JavaScript is also CaSe SeNsItIvE. You must match up the filenames and other properties in exactness.



Using JavaScript to find and use objects is similar to finding a certain file in a certain folder on your computer. It uses a "path" format.

Example :
You have a file called "MyFile.txt".
It is in a folder called "Folder2".
The folder is located on your C drive.

To find the location of this file, the path would be
"C:\Folder2\MyFile.txt"

The same type of "path" system is used in JavaScript. It follows the path from the largest area and narrows down to a specific area or object.


As with most language commands, JavaScript follows it's own basic rules and formats. JavaScript can perform automatic functions of calculation to create a more interactive web site.

To get the browser to recognize JavaScript code, we have to place the code within SCRIPT tags :

<script type="text/javascript">

</script>

In many tutorials, you will notice the use of the COMMENT tags within the SCRIPT tags.

<script type="text/javascript">
<!--

// -->

</script>

These comment tags are used to "BLANK OUT" the JavaScript from any browsers that are unable to view or display JavaScript. About 98% of my viewers DO have JavaScript capable browsers and have that option turned on, so it is a very small error reducing factor.



JavaScript comes in 2 varieties :
Auto script
Script that carries out a set of codes (known as a blocks) automatically without the need for visitor input or occurance.
Trigger script
Script that requires some visitor input or occurance to carry out a set of codes.
JavaScript Basics >> Variables
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow