I needed the same thing for my site, and was sent in the right direction by asking here, and now, I'll return the favour!
First of all you need the script and the style in separate pages (as you have already said you have done).
You then need to create a second .js file in document.write format which will do the actual menu bar.
Like so:
Code:
with(document){
document.writeln('<a onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, \'150px\')" onMouseout="delayhidemenu()">Web Design</a> | ');
document.writeln('<a onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, \'150px\')" onMouseout="delayhidemenu()">New Sites</a></p>');
}
and call it navbar_menu.js.
Then all you will need to do is place
HTML Code:
<link rel="stylesheet" href="navbar.css" type="text/css">
<script src="navbar.js" type="text/javascript"></script>
in the header of each page that uses the menu and
HTML Code:
<script src="navber_menu.js" type="text/javascript"></script>
where you want the menu to appear.
That's pretty much what I did and it works for me!
Martyn.
- credit to jscheuer1 for the help in the first place
Bookmarks