473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1007
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">');

// START LINKS COPY AND PASTE 2 LINES TO ADD A NEW BUTTON


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">');

document.write('</td></tr></table>');


// 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

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

Similar topics

3
by: Adonis | last post by:
I wish to create a popup menu from a list, when it is created they all show the same label from the list: Months = def _Menu_Click(self, month): print month menu = Menu(fraMain, tearoff=0)
1
by: Richard L Rosenheim | last post by:
There is a Popup event for when context menus are displayed. Does anyone know of any way of determining if the context menu is being displayed, and detecting when a context menu is closed? ...
2
by: Mark Preston | last post by:
Its perhaps a bit early to ask, since I'm still doing the page design and haven't got down to the coding yet, but I wonder if anyone can help with a bit of a question. To lay the groundwork, a...
2
by: Lisbeth952 | last post by:
I'm sorry if this question is so basic that it's bordering on inane. I'm trying to do a simple menu system where the links light up when you mouse over, which I've accomplished quite nicely with...
8
by: I_AM_DON_AND_YOU? | last post by:
I have a Menu with 5 Menus as: Menu Name Menu Text M1 File M2 Edit M3 View M4 ...
0
by: John Dann | last post by:
On a winform with a conventional Windows menu bar: I have a second level menu item under one top-level menu that I now want to move to a different top-level menu - let's say from File to Edit....
5
by: Kevin Walzer | last post by:
I'm having difficulty structuring a Tkinter menu entry. Here is the command in question: self.finkmenu.add_command(label='Update List of Packages',...
5
by: Victor | last post by:
Hi Guys. I am currently having a problem with my menu control. The requirement for menu is. All root menuitems will be displayed as images. The image for each root menuitem will be different. All...
5
by: Angus | last post by:
I have had a look at http://javascript.internet.com/navigation/cascade-menu.html Which is roughly what I want to do. Roughly the menu looks like this: Menu #1 Menu #2 Menu #3 Menu #4
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.