Board Logo

multiple menus
lantsen - 7/22/2003 at 09:52 PM

I am trying to place several (a total of 4) menus onto one single html page. I've made two of the menus so far. With just one menu in the page, it works fine, but once I place another one, the menus start acting funny or don't show up properly. I noticed in the documentation that it said you could have multiple menus and gave you a little example. I was wondering if anyone might be able to help me out on this.
I don't have a lot of JavaScript knowledge :-(

CNerd2025 - 7/23/2003 at 12:45 AM

I can help you if you tell me:
Are the menu's all vertical, all horizontal or a combo of both?
Are the items for the menus all the same, all different, or some the same (e.g. two menus share the same items, the other two have different items).
I have the AIM screen-name of andybud689. IM me sometime and I can help you.

nik - 7/23/2003 at 07:50 AM

Please, mention URL of your page with menus if it is possible.

btreehouse - 8/15/2004 at 09:49 PM

The scripts were created using the online menu builder.

I followed the directions on post

If anyone wants to look at it, I have it in a zip file located at:

8 files total for a total of 5kb

tigra - 8/16/2004 at 03:47 PM

Your download link doesn't work.

btreehouse - 8/16/2004 at 07:38 PM

btreehouse - 8/16/2004 at 07:44 PM

tigra - 8/17/2004 at 03:39 PM

1. you define MENU1_POS in menu1_tpl.js and pass MENU_1POS to menu constructor in index.html
2. line
<!-- files with geometry and styles structures for corresponding menus --!>

keeps the multiline comment open so javascript block with all menu constructors are commented out. Correct HTML comment syntax is:

<!-- files with geometry and styles structures for corresponding menus -->

btreehouse - 8/17/2004 at 07:28 PM

I got it to work now.

I also noticed I had incorrect syntax here


but I fixed that too and now it works.

wildbi111 - 5/20/2006 at 10:29 AM

I've followed the same directions and cannot get it to work. All files called int he index page are present and file permissions/ownership are set correctly. All I get is a blank page. If anyone has a suggestion I would appreciate it. Thx in advance.

Here's the index page code:

<script language="JavaScript" src="menu.js"></script>
<script language="JavaScript" src="menu1_items.js"></script>
<script language="JavaScript" src="menu2_items.js"></script>
<script language="JavaScript" src="menu1_tpl.js"></script>
<script language="JavaScript" src="menu2_tpl.js"></script>
<link rel="stylesheet" href="menu1.css">
<link rel="stylesheet" href="menu2.css">
<BODY bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0" bgcolor="white">

<script language="JavaScript">


wildbi111 - 5/20/2006 at 10:50 AM

I got it working. Forgot to make sure the variables in the tpl.js files mathed the variables inthe index page.

chez - 3/11/2007 at 01:08 PM

I have been working on setting up a page with no less than 8 different menus (they are vertical of different colours, and using the wrapper method didn't work in IE7 so that's why I am creating 8 separate menus. Everything is fine with the first menu but I can't get the subsequent menus to pick up their styles - they do pick up the dynamic styles eg background colour, mouseover etc, but not their fonts or anything.

I just can't see what I've done. I followed the instructions here:

How does each menu know to pick up it's style from menu2.css, menu3.css (I have changed the class names and everything as instructed)

Would be grateful if anyone can help

chez - 3/11/2007 at 03:06 PM

ok, now I have managed to get menu1, menu3, menu4, menu5, menu6, menu7 and menu8 to all work right, but menu 2 will not see its style sheet. I have tried just removing it ie removing all references in index.htm to it just leaving a gap where it should be, then I find menu3 and menu4 then lose their styles.

I just cannot see what's going on to cause this. Any ideas, please?


chez - 3/11/2007 at 07:41 PM

Here is a link to my menus, showing the offending one:

Waiting anxiously by the computer for assistance as I've run out of ideas lol!!

chez - 3/11/2007 at 09:44 PM

I am posting this for the benefit of anyone else who is a first timer:

Support/Helpdesk reply from Tigra:

The menu knows its styles by the names of the CSS classes. First menu picks
the styles that start from .m0 second - .m1 third .m2 etc.
I see you have classes .m0 and .m2 but not .m1 This explains why second
menu doesn't look right.

Thank you very much for your help tigra :)

Back to forum: