469,632 Members | 1,730 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,632 developers. It's quick & easy.

Menu Question!!

my website www.horsespirit5.com

there are two menus, the one on the right I have a problem with.

As you can see, on this menu I have affie rotation etc. Everything on this menu I am just manually coding on every page of the site. But, if I get a new affie, I would have to go through every page of the site and manually add the new button in.

Is there a way to format the content for this menu in my stylesheet?

Sorry, I hope my question makes sense. Thanks!!
Jul 20 '07 #1
2 948
Yep. Here's how:

Make a new file, and call it "menu.js" then paste this in:

<!-- Begin

// NOTE: If you use a ' add a slash before it like this \'

document.write('<TABLE cellpadding="1" cellspacing="1" border="0" class="menu-table"><tr><td align="center">');


document.write('<a href="index.html" class="menu">Home</a>');
document.write('</td><td align="center">');

document.write('<a href="contact.htm" class="menu">Contact</a>');
document.write('</td><td align="center">');


// End -->

You'll have to format the table the way you need to menu to layout. This one I think is a horizontal menu.

Then paste this in on every page where you need the menu:

<script language="JavaScript" type="text/javascript" src="menu.js"></script>

Then anytime you need to change the menu you only have to alter menu.js to change it on all the pages. Time saver for sure.
Jul 21 '07 #2
I have another question, sorry. Can I use javascript codes in this? For my banner rotation, it's a javascript code so can I put this in the menu?
Jul 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Adonis | last post: by
1 post views Thread by Richard L Rosenheim | last post: by
2 posts views Thread by Mark Preston | last post: by
2 posts views Thread by Lisbeth952 | last post: by
8 posts views Thread by I_AM_DON_AND_YOU? | last post: by
reply views Thread by John Dann | last post: by
5 posts views Thread by Kevin Walzer | last post: by
5 posts views Thread by Victor | last post: by
5 posts views Thread by Angus | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.