|
Drop Down Menu for Use on Multiple Pages Menus on This Page (How To) Tigra Menu TimeStamp Picker (American Format) |
TimeStamp Picker (European Format) Banner Rotator Additional Information |
Drop Down Menu for Use on Multiple PagesClick here to see a demo of this menu
Place this code on every page at the location you want the menu to appear.
This script can be installed on multiple pages of your site and easily maintained from the myMenu.js file. If you add or delete pages that use the menu, you will not have to go to every page to change the script. Just make the necessary changes in the myMenu.js file and any page you add. The myMenu.js file is setup to produce the menu shown in our demo. You will want to change it to make a menu of your choice. myMenu.js contains two arrays. Edit these arrays for the menu you want to display. pageSubject contains the information that will be displayed in the drop down menu and pageURL is the url that your visitor will be taken to from his selection. You can add or remove elements to the arrays and you will not have to make changes to the existing pages. You will need to change the value of the thisSubject variable in the code that you place on a new page. The purpose of this is to make the default selection in the drop down box be the page that you browser is currently displaying. You can find more detailed information on the implementation of this script in the demo pages of the menu. Menus on This Page (How To)You will see a menu like this
at the top and bottom of every page in this Code4U Section of JavaScript Corral. I will now describe how this was done so that you can implement something similar on your pages. The instructions here are written as if you will be implementing this script on your Site. I recommend that you follow the instructions and set up the script on a test page so you can understand how it was done. Then you can edit it to make it to work the way you want. Place at top of HEAD section on every page that uses menu.
Place this code on every page at the location you want the Menu to appear.
This script is installed on multiple pages of this JavaScript Corral site and is easily maintained from the jsC4Unav.js file. It is important to understand that you will not be copying this exact script to your Site but will be using it as an example of how you can do something similar. The "js" file used here was named jsC4Unav.js. You will probably want to rename it to something of your choice. You likewise will probably change the name of the variable c4uNav. Examine the c4uNav variable in the jsC4Unav.js file and you will see that it is a string that is printed to the page using the document.write() method. That is all there is to doing this. The technique demonstrated here really makes it easier to maintain a menu on multiple pages. Tigra Menuby Denis GritcyukThis is the latest script by Dennis. It is a really cool menu. Click here to visit his site for a demo and learn more. Timestamp Picker (American Date Format)by Denis Gritcyuk
Code used in BODY section for above demo
Images used:
The author of this script is Denis Gritcyuk. Visit his page for more information and to contact him. This script is intended for someone with JavaScript programing knowledge. Script can be modified to work for your particular situation. See author's notes in the script.
Timestamp Picker (European Date Format)by Denis Gritcyuk
Code used in BODY section for above demo
Images used:
The author of this script is Denis Gritcyuk. Visit his page for more information and to contact him. This script is intended for someone with JavaScript programing knowledge. Script can be modified to work for your particular situation. See author's notes in the script.
Banner Rotator
Basic code to store Ads
Place this code where you want Banner to appear
Click here to reload this page and you will see that the banner above changes. It currently rotates between 3 different banners in a random process. Clicking on any of the banners will take you to the appropriate page. This script is intended for someone with JavaScript programing knowledge. This script can be used for both text ads and banners.
Just replace the HTML code for Ad with the HTML code for each of your ads. For example, a text ad could look like this:
Adjust the variable maxAdNo and the number of elements in the Array to match the number of Ads you want to display.
Some of the Scripts on this page has been contributed by other authors. The information on the script clearly identifies the author if this is the case. The Scripts on this page require that you know and understand how to use JavaScript. These Scripts are not cut-n-paste but do give the basics that a person experienced with JavaScript can understand and use. |
|
| Miscellaneous Code 4 U |
|