Submenus missing when embedding in table

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
1850EmilyH
Beginner
Beginner
Posts: 2
Joined: Sun Jan 14, 2007 10:05 pm

Submenus missing when embedding in table

Post by 1850EmilyH »

At the following link, http://www.mdrs.org/Test/Index.htm, I have embedded a vertical menu into the table. I have the main menu information in a document entitled v_embedded_main_menu.js and the submenu info. in v_menu_data.js.

In Firefox, my submenus do not pop up (they do come up in Safari). I can get the submenus to pop up if I move the submenu code into v_embedded_main_menu.js, but I understand that this will cause a new problem in another browser. In addition to any other ideas that you may have, I think that I need a complete example of what my menu_data.js code should be, especially if it is different when I am using an embedded main menu document.

Thanks for helping!
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Welcome to Milonic.

First thing. You only need one copy of the code files. In your site you have one copy for the horizontal menu and one for the vertical menu. Here is the code you should be using for all menus:
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="http://milonic.com/">DHTML Menu JavaScript Menu Powered by Milonic</a></noscript>
<script type="text/javascript" src="mmenudom.js"></script>
The above needs declaring in the head or just after the <BODY> tag.

Then, you only need to declare your menu data files, the code has already been declared once and doesn't need doing again.

Also, please note that you need to commit the menus as you go. You do this by adding drawMenus(); to the end of each of your menu data.js files.

This should hopefully fix things

Hope this helps,
Andy
1850EmilyH
Beginner
Beginner
Posts: 2
Joined: Sun Jan 14, 2007 10:05 pm

Post by 1850EmilyH »

That fixes it!

Thanks so much.
Post Reply