SubMenu Items missing in NS 7.1

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jkgraham
Beginner
Beginner
Posts: 5
Joined: Fri Oct 24, 2003 6:59 pm

SubMenu Items missing in NS 7.1

Post by jkgraham »

Hi, I'm using v5 RC18 and have installed a very simple menu, but the menu background colors and borders aren't visible in Netscape 7.1. It works fine in NS 6.2 and all versions of IE. Here is the site:

https://www.nwp.usace.army.mil/im/dev/op/

A link to the menu_data.js is also on that page.

Any help would be greatly appreciated.

-Jon
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Jon,

I had a look. When I view the source for you test page, I see alot of code at the bottom with DIVs that have IDs set to id="menu1", id="menu2", etc. At first, I though I was somehow looking at code generated by the menu system, but then I realized that (1) there are way more of these than menu items in your menu_data.js, and (2) they are using classes specifically defined in your reg.css file, where the text color is set to white. So, I'm assuming that this code is left over from an earlier attempt to create a css-based menu system before trying out Milonic, and that the text color is currently set to white just to hide the text while trying out Milonic. Am I right?

Anyway, it's the div IDs that are causing the problem. You can't use menu1, menu2, etc., because these are apparently used internally by the Milonic system. In your case, these DIVs are overriding the Milonic menus. For example, if you point at the "ESA/ESF Consultation" item the main menu, the DIV set to id="menu1" is displayed, rather than the "esa" menu that you've defined in menu_data.js. To see what I mean, change 'text=Programmatic Biological Opinion - SLOPES II (July 8, 2003) (PDF)' to 'text=wtf' in the "esa" menu's first item to see what I mean... the "esa" submenu still won't appear when you mouse over the main menu, because the id="menu1" DIV is being displayed instead. Now change id="menu1" to id="oh_bugger" in your html file, to eliminate the conflict. Refresh the page, mouse over the main menu, and you should now see your "esa" submenu.

Hope that helps,

Kevin
jkgraham
Beginner
Beginner
Posts: 5
Joined: Fri Oct 24, 2003 6:59 pm

Post by jkgraham »

Yep, that was it. Left over divs from my old menu system I forgot to delete.

Thanks!
mckee@newsstand.com
Advanced
Advanced
Posts: 16
Joined: Tue Sep 30, 2003 10:00 pm

Post by mckee@newsstand.com »

Wouldn't it make sense for the Milonic menus to use something more esoterid than menu1, menu2, etc.? People may have other code on their systems and it would be very normal for a person to create these variable names. Clearly in other portions of the code names are preceeded by an underscore to reduce the likelihood of a name conflict.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

It's all part of the API.

Common variables such as menu are named as such so that when users incorporate their own modules they can use the easy to remember variable names.

I suppose "_menu" would be better. Anybody else think we should change the variable names?

-- Andy
Post Reply