A little help with Tree menu & Firefox Issue

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ripnoel
Super Advanced
Super Advanced
Posts: 50
Joined: Tue Jan 21, 2003 4:15 am
Location: Foothills of The Great Smoky Mtns.

A little help with Tree menu & Firefox Issue

Post by ripnoel »

Greetings,

I have set up a tree menu on http://foodscience.tennessee.edu/v2/ and need some help to fix an issue where the sub-menus scroll in Firefox. This does not happen in IE.

I also have a problem in that when you are in a section like "Proteins" and click a sub-menu item it jumps you to that page but the "Proteins" area menu becomes collapsed and you don't see and indication in the menu of where you have just navigated to.

Help in resolving these issues greatly appreciated.

Thanks,

Rip

PS Please ignore my previous posts as they are just confusing. Help GREATLY appreciated!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: A little help with Tree menu & Firefox Issue

Post by Ruth »

Hi,

Just so you know, the collapse menu, treemenu etc are not in final release, they are still in development, however many use the collapse with no problems. The issues usually arise when they are placed position='relative'. Now, having said that, I saw this issue once before and happen to remember the fix the person did. It seems to work, but it is a use at your own risk type of thing. I tested it in IE, FF1.5, 2, NN7, 9 and Safari 3 beta for PC and it seemed to work fine.

Add fixMozillaZIndex=true; to the top of the collapse data file

Code: Select all

_scrollDelay=10
fixMozillaZIndex=true;
Then in the actual submenus Proteins, Carbohydrates, Biophysics add position='absolute'; to them, i.e.

Code: Select all

with(new menuname("Proteins")){
style = sub1Style;
//margin=AllMargin
position='absolute';
That seems to fix the issue with the collapse menus in FF and I don't see any other problems in the other browsers as a result.

As a point of information, must you support NN4 browsers? If you do not need to support that browser, which is very old, you can change your program file calls to

Code: Select all

<script type="text/javascript" src="milonic_src.js"></script>	
<script type="text/javascript" src="mmenudom.js"></script>
and then the data file call.

Ruth
ripnoel
Super Advanced
Super Advanced
Posts: 50
Joined: Tue Jan 21, 2003 4:15 am
Location: Foothills of The Great Smoky Mtns.

Re: A little help with Tree menu & Firefox Issue

Post by ripnoel »

Hi Ruth,

That did the trick to fix the submenu scrolling issue and was very quick and easy. Thank you.

I do also understand that the tree menu is still in beta too.

Is there, however, a way to have the tree stay "rolled out" & highlight the page link you navigate to? This would be a great function if it is possible.

Thank you again for that fix.

Cheers,

Rip
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: A little help with Tree menu & Firefox Issue

Post by Ruth »

Sorry, I forgot the stay open part.

There is something called openBranchByName that can be used. You'd put this code on the page where you want the branch to open. I've seen it placed right after the drawMenus(); of the main collapse menu and I've seen it placed just before the closing body tag. I believe having it just above the closing body tag was to solve some timing issues in some cases where the menu wasn't fully loaded when the open branch was read so it didn't work because it couldn't find what to open.

So, on each page where you want a particular branch to remain open you'd put

Code: Select all

<script type="text/javascript">
 openBranchByName(menuName); 
</script>
</BODY>
So, on the page where you want the Proteins submenu open you'd substitute Proteins for menuName.

Ruth
Post Reply