...

View Full Version : Menu with external javascript or similar



MagicalChair
07-08-2005, 09:21 PM
I need a menu that accesses an external javascript file (or other type) for the contents of the menu. That is, When I add a link to my menu, I only want to have to add it once, in an external file that every page uses for the menu items. I know there was one on Dynamic Drive before, but i can't find one now. Does anyone know of any suggestions?

bfsog
07-08-2005, 10:14 PM
Well it depends.

Do you just want a series of links on same line/different line?

Or do you want one of the "all singing all dancing" menus?

If its the first, you would just save the file as filename.js, with no <script> </script> tags in it. For example the following is a example of external .js file



document.write("hello<br>");
document.write("my name is ....... !");


Then to link that into a file, you simply do



<script src="filename.js"></script>


Then when you want to edit the menu/whatever you just update filename.js

Hope this helps

MagicalChair
07-09-2005, 01:30 AM
I think I get it, thanks for the help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum