Provide thousands of free JavaScript code examples, DHTML, HTML JavaScript Tutorials, Reference and Help. JavaScriptBank.com is the best JavaScript resources
Notes
The files for this script are (these are links, so you can right click and chose
to save targets):
* If necessary you may place small amount of information (e.g. Company
Logo) before these script pointer.
(Be carefully – menu must be placed on top of your pages.)
(Optional) To customize your menu color (text color, background color,
highlight color):
Modify following four lines in the menu_script.js:
var tdColor="#FFFFFF"; // menu item text color
var tdBgColor="#993366"; // menu item background color
var hlColor="#000000"; // highlight text color
var hlBgColor="#FFFFBB"; // highlight background color
Modify following lines in the dropdown.css:
table.menu td {
color: #FFFFFF; /* Must be the same as tdColor */
background-color: #993366; /* Must be the same as tdBgColor */
border: 0px;
padding: 0px 8px 2px;
font-family: Arial;
font-size: 8pt;
white-space: nowrap;
}
Check: Configuration Files (dropdown.css, menu_data.js, menu_script.js) must
be located
in the same folder as your HTML pages!
Limitations
The DropDown Menu works only with new versions of browsers, such as:
The file menu_data.js is a set of pair: parameter = "value".
To each item of the menu there should correspond one or two parameters.
The first parameter (Required) looks as follows: td_* = "Item Caption"
The second parameter (Optional) looks as follows: url_* = "Item URL"
If the second parameter is present, after click by the mouse the user will be
redirected
to page with appropriate URL value .
For example if the top line of your menu looks as follows: Home Page Online Shop Services Company Info Contact
Us Privacy Policy Help
You should add the following parameters in your menu_data.js
And so on: Each item of your menu can has infinite sub menu levels!
The order of an arrangement of parameters in menu_data.js has no value.
But in each line there can be only one parameter (and its value).
Remember to enclose all parameters values in double quotes (").