Trouble with Tree Menu Items

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
fluffygang
Beginner
Beginner
Posts: 7
Joined: Mon May 09, 2005 3:24 pm

Trouble with Tree Menu Items

Post by fluffygang »

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/sosdvdtes ... /home.html

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

Kind Regards,
Adam
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Try clicksubimage= in place of onsubimage=.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

John's right. You need to put this into your data file

Code: Select all

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
fluffygang
Beginner
Beginner
Posts: 7
Joined: Mon May 09, 2005 3:24 pm

Post by fluffygang »

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

I removed the changecolorsbyclick.js file, and replaced the onsubimage with...

Code: Select all

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: Select all

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: Select all

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: Select all

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
fluffygang
Beginner
Beginner
Posts: 7
Joined: Mon May 09, 2005 3:24 pm

Post by fluffygang »

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!!
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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)?
John
fluffygang
Beginner
Beginner
Posts: 7
Joined: Mon May 09, 2005 3:24 pm

Post by fluffygang »

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).
fluffygang
Beginner
Beginner
Posts: 7
Joined: Mon May 09, 2005 3:24 pm

Post by fluffygang »

...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 :|
Post Reply