Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-08-2005, 09:21 PM   PM User | #1
MagicalChair
New Coder

 
Join Date: Feb 2005
Location: Winchester, KY
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
MagicalChair is an unknown quantity at this point
Menu with external javascript or similar

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?
__________________
And the forests will echo with laughter...
MagicalChair is offline   Reply With Quote
Old 07-08-2005, 10:14 PM   PM User | #2
bfsog
Regular Coder

 
Join Date: Dec 2002
Location: UK
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
bfsog is an unknown quantity at this point
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

Code:
document.write("hello<br>");
document.write("my name is ....... !");
Then to link that into a file, you simply do

Code:
<script src="filename.js"></script>
Then when you want to edit the menu/whatever you just update filename.js

Hope this helps
bfsog is offline   Reply With Quote
Old 07-09-2005, 01:30 AM   PM User | #3
MagicalChair
New Coder

 
Join Date: Feb 2005
Location: Winchester, KY
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
MagicalChair is an unknown quantity at this point
I think I get it, thanks for the help.
__________________
And the forests will echo with laughter...
MagicalChair is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:33 AM.


Advertisement
Log in to turn off these ads.