| Site Navigation.net | SM |
script language Javascript-
|
| Home | What's New | Menus & Navigation Systems | S N Guide | Thermometer | Articles | Tutorials | Resources |
|
| Directory of free javascript menu Java menu and DHTML script for your website |
Cool website navigation Menus in script language JavascriptSee Also
TipYou can also include the javascript as an external js file. Take the script and paste it, all by itself, into a word processor. It should be the only thing on the page. Now, knock off the beginning and end SCRIPT commands. These things:<SCRIPT LANGUAGE="JavaScript"> and </SCRIPT> Get rid of them. Erase them. You'll pick them up again later. Now do a SAVE AS command and save the file as TEXT only (the same way you would an HTML file), give it a name and add the extension .js. Let's say you want to name this file "mike". Do a Save As, making sure you are saving as text alone, and give the file the name "mike.js". Okay, you're done with that. Calling For The JavaScript FileYou have the JavaScript file saved. Now we need to call for it in another document. Let's get to the example of JavaScript that produced the date above on right side of the top navigation bar on this page. I followed the same instructions I just gave you above and created a file called "date.js" (see the source). To get its effect on my page, I placed these commands:<SCRIPT LANGUAGE="JavaScript" SRC="date.js"> </SCRIPT> |