Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:45

Trouble with Tree Menu Items


Poster: fluffygang
Dated: Monday May 9 2005 - 15:39:21 BST

Hi,

I am trying to build a page which will have 2 Milonic menus on it, one of which will be Tree style. I have made a mock-up, and it almost works (the tree menu on the left opens and closes when you click on the menu option, roll-overs work, etc.), but I can't get the menu item to stay looking "active" whilst its submenu remains open.

In other words, when you click on "Video Interview" its sub-menu opens correctly, but once the mouse has moved away from "Video Interview" it goes back to looking like it did before its submenu was opened. I would like it to look as if it's still active in some way (e.g. by the arrow remaining pointed down) until the user clicks on it again to close its sub menu.

Hope that made sense!

The test page is...

http://www.relative-media.com/sosdvdtest/adamnavtest/home.html

I'd be grateful for suggestions, as none of the ideas I've tried have worked so far.

Kind Regards,
Adam


Poster: John
Dated: Monday May 9 2005 - 18:36:41 BST

Try clicksubimage= in place of onsubimage=.


Poster: Ruth
Dated: Monday May 9 2005 - 19:36:41 BST

John's right. You need to put this into your data file
Code:
lhsMenuStyle.clickcolor="#ff0000"
lhsMenuStyle.clickbgimage="mainRoll[1].gif"
lhsMenuStyle.clicksubimage="arrowDown[1].gif"
below your lhsMenuStyle, and you need to remove the changecolorsbyclick.js file from the page. For some reason when that file is on the page, the clicks don't change in the tree menu.

Ruth


Poster: fluffygang
Dated: Tuesday May 10 2005 - 7:48:27 BST

Hi, I'm afaid I'm still having trouble...

I removed the changecolorsbyclick.js file, and replaced the onsubimage with...
Code:
clickcolor="#ff0000";
clickbgimage="./images/nav/side/mainRoll.gif";
clicksubimage="./images/nav/side/arrowDown.gif";

...in the lhsMenuStyle definition. Now nothing changes at all on the menu item when you open its submenu.

I wasn't sure what the difference was between adding the above 3 lines to the style definition, or adding them after it as follows...
Code:
lhsMenuStyle.clickcolor="#ff0000"
lhsMenuStyle.clickbgimage="./images/nav/side/mainRoll.gif"
lhsMenuStyle.clicksubimage="./images/nav/side/arrowDown.gif"

... but neither way seems to make any difference.

The style definition now looks like this...
Code:
with(lhsMenuStyle=new mm_style()){
followscroll=0;
subimage="./images/nav/side/arrowRight.gif";
clickcolor="#ff0000";
clickbgimage="./images/nav/side/mainRoll.gif";
clicksubimage="./images/nav/side/arrowDown.gif";
subimageposition="middle;right";
fontfamily="arial, helvetica, sans-serif";
padding=5;
offcolor="#000000";
oncolor="#ff0000";
fontsize="9pt";
fontstyle="normal";
fontweight="normal";
align="left";
itemwidth=171;
itemheight=28;
}

...and the (main bit of the) menu looks like this...
Code:
with(milonic=new menuname("JeffWayneSideMenuLHS")){
style=lhsMenuStyle;
alwaysvisible=1;
left=34;
top=154;
aI("itemheight=7;image=./images/nav/side/top.gif;");
aI("bgimage=./images/nav/side/mainOff.gif;overbgimage=./images/nav/side/mainRoll.gif;text=Introduction;url=#;status=Introduction;");
aI("bgimage=./images/nav/side/mainOff.gif;overbgimage=./images/nav/side/mainRoll.gif;text=Video Interview;url=#;status=Video Interview;showmenu=JeffWayneVideoInterview;type=tree;");
aI("bgimage=./images/nav/side/mainOff.gif;overbgimage=./images/nav/side/mainRoll.gif;text=Photo Gallery;url=#;status=Photo Gallery;");
aI("bgimage=./images/nav/side/mainOff.gif;overbgimage=./images/nav/side/mainRoll.gif;text=Resources;url=#;status=Resources;");
aI("itemheight=7;image=./images/nav/side/bottom.gif;");
}

I guess I'm still doing something dumb, or missing something obvious - please can you help?

Kind Regards,
Adam


Poster: fluffygang
Dated: Tuesday May 10 2005 - 11:09:48 BST

Aaargh - just noticed that the menu doesn't seem to work at all on the Mac (Safari 1.1 or IE 5.2 under OS X v10.3.9)! HELP!!


Poster: John
Dated: Tuesday May 10 2005 - 15:05:43 BST

You're 21 levels down with your code. Current is 5.723. Get up to level (required for support) and we'll keep going from there.

Also, the current Safari is 1.3 (v312). As for most of the rest of us, why worry about a dead non-supported product (IE/Mac)?


Poster: fluffygang
Dated: Tuesday May 10 2005 - 16:11:16 BST

Ah - sorry about that - I should have checked. I've moved the test code to my own server at...
http://www.bodytronix.co.uk/sostest1/home.html
...because my Milonic code is up to date!

Some of the problems have got better now! The tree menu works perfectly on the PC now, but still doesn't work on the Mac browsers (discovered my Safari was 1.3 v312, not 1.1 as I said previously). Unfortunately I have to worry about these older browsers because my client requires a certain level of compatibility with older browsers.

So my problem now is that the menus don't seem to appear at all on Mac Safari 1.3, and the tree doesn't open up on Mac IE 5.2).


Poster: fluffygang
Dated: Thursday May 12 2005 - 8:11:10 BST

...just as a footnote, Milonic do say that their code "works perfectly" with both of these browsers, so I should be able to get the menus to work if I could just figure out what (dumb?) thing I'm doing wrong :|