Board Logo

Multiple Menus - How to add a second menu
BasilH - 4/9/2007 at 04:40 PM

I need to add a second menu to a page. The first menu is called with
<div id="NAV"><script language="JavaScript">new menu (MENU_ITEMS, MENU_TPL);</script></div> and this woks for the first menu,

There are no frames on the page.

The second menu files are items1.js, template1.js, menu1.css

Using - new menu (MENU_ITEMS0, MENU_POS0) and new menu (MENU_ITEMS1, MENU_POS1) does not work.

Thanks


tigra - 4/9/2007 at 06:12 PM

do you have all four variables defined:
MENU_ITEMS0, MENU_POS0, MENU_ITEMS1, MENU_POS1

you can get some ideas from instructions for Tigra Menu v1.0 at
http://www.softcomplex.com/forum/viewthread_999/


BasilH - 4/10/2007 at 12:11 PM

Quote:
Originally posted by tigra
do you have all four variables defined:
MENU_ITEMS0, MENU_POS0, MENU_ITEMS1, MENU_POS1

you can get some ideas from instructions for Tigra Menu v1.0 at
http://www.softcomplex.com/forum/viewthread_999/


Thanks for you quick response.
I have looked at viewthread_999,
Changing my file names from items.js to menu1_items.js and template.js to menu1_tpl.js and the same for menu 2 does not work.
I also am not sure how to define the variables.


tigra - 4/10/2007 at 03:57 PM

If you have two menus working separately then you defined variables already.
Just adjust their names so they match the names you pass to the menu initializations.

menu1_items.js with MENU_ITEMS0
menu1_tpl.js with MENU_POS0
menu2_items.js with MENU_ITEMS1
menu2_tpl.js with MENU_POS1

these are the names that you use in

new menu (MENU_ITEMS0, MENU_POS0) and
new menu (MENU_ITEMS1, MENU_POS1)

Keep and eye on the JavaScript error console of your browser. I'll let you know if there is a problem. If it says something is not defined then you know the variable name or filename don't match.


BasilH - 4/10/2007 at 04:08 PM

Quote:
Originally posted by tigra
If you have two menus working separately then you defined variables already.
Just adjust their names so they match the names you pass to the menu initializations.

menu1_items.js with MENU_ITEMS0
menu1_tpl.js with MENU_POS0
menu2_items.js with MENU_ITEMS1
menu2_tpl.js with MENU_POS1

these are the names that you use in

new menu (MENU_ITEMS0, MENU_POS0) and
new menu (MENU_ITEMS1, MENU_POS1)


Many thanks
I think I figured it out.
I also needed to adjust the css block in the menu_tpl1.js file
I appreciate the very prompt responses!

Keep and eye on the JavaScript error console of your browser. I'll let you know if there is a problem. If it says something is not defined then you know the variable name or filename don't match.



Many thanks
I think I figured it out.
I also needed to adjust the css block in the menu_tpl1.js file
I appreciate the very prompt responses!


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/