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:46

set variable to force top level menu onbgcolor highlight


Poster: rockmill
Dated: Tuesday January 27 2004 - 17:21:56 GMT

I need to set the top level highlight menu (onbgcolor?) for pages that are not listed within the menus. This is because some of the pages are generated on the fly.

Is there a variable I can set within a page to force the top level menu to stay highlighted?

I read through the other postings and tried one example but I couldn't get the "update display" part to work - BDmenu(?) caused a JS error.

I am using version:
Version 5.0 Release Candidate 19.0 Built: Tuesday October 28 2003 - 11:12

Cheers

Patrick


Poster: kevin3442
Dated: Tuesday January 27 2004 - 20:37:13 GMT

Hi Patrick,

It sounds like you may have tried using a function I wrote, from this thread, called mm_changeItemProperties(). Is that the case? If so, maybe you can tell me how you tried using it, or provide a link to an example page where you tried using it, and I can see what might be going wrong.

Kevin

Re: set variable to force top level menu onbgcolor highlight


Poster: kevin3442
Dated: Tuesday January 27 2004 - 20:40:53 GMT

rockmill wrote:
...I am using version:
Version 5.0 Release Candidate 19.0 Built: Tuesday October 28 2003 - 11:12.

I just noticed this part of your post. RC19 is way old. You might want to download the latest (RC46).

Kevin


Poster: rockmill
Dated: Wednesday January 28 2004 - 10:26:40 GMT

Kevin,

Now I am really confused! I have download RC46 & RC50 but neither help me. They actually make things worse.

In my original posting I got the property name wrong. I want to change pagebgcolor.

In RC19 when a file was the active file, the menu changed the background colour to indicate which menu that file was under. This stayed that way in RC42 but in RC46 & 50 this no longer works. This is a really big problem for me.

Test pages here: http://www.rockmill.co.uk/MilonicTest/
All versions of Milonic in this test area are using the same menu_data.js file and the same style sheet. RC19 got the font size wrong - which has been fixed in the later versions. There is also a test page for RC46 using your function mm_changeItemProperty but I can't get that to change pagebgcolor either (75).

Any help would be very much approciated.

Cheers

Patrick


Poster: kevin3442
Dated: Wednesday January 28 2004 - 17:39:32 GMT

Hi Patrick,
rockmill wrote:
Now I am really confused! I have download RC46 & RC50 but neither help me. They actually make things worse.

RC50? Now I'm getting confused! I did a quick check, and there isn't an RC50. I'm thinking that you probably saw the version number 5.0 in the .js comments and mistook it for an RC... that's what happens when you work on this stuff too late at night! Anyway, as of this writing, the current release is RC46 Built: Wednesday January 28 2004 - 11:27. Your RC46 and your RC50 test use RC46 Built: Monday January 26 2004 - 19:00; so both are really the same test and, as you reported, it fails. I used your test pages locally and found that pagecolor and pagebgcolor work up through RC45, but stop working in RC46 (including the one from the 28th). So, my initial guess is that those properties are broken in RC46 and that this should be reported in the bugs thread.

Quote:
In my original posting I got the property name wrong. I want to change pagebgcolor... There is also a test page for RC46 using your function mm_changeItemProperty but I can't get that to change pagebgcolor either (75).

More confusion for me... I'm not sure why you refer to 75... that's the codeRef for the pageborder item property... did you test that one too? I see, however, that your current test passes a codeRef of 19 in the call to mm_changeItemProperty(); 19 is the correct codeRef for pagebgcolor. Of course, that fails in the test too. But it's not failing because of the function. In fact, you'll find that pagebgcolor is in fact successfully changed to #ff0000 in your test (try it with RC42 and change the fourth parameter from a 0 to a 1). The change in your test isn't apparent, however, because pagebgcolor doesn't work in RC46. Also, in your call to mm_changeItemPropery(), the last parameter (updateDisplay) should be set to 1 to force an immediate update of the display; yours is currently set to 0, so the change wouldn't take effect until the next mouseover. It's academic right now, of course, since pagebgcolor isn't working. But try it on the offbgcolor property and you'll see what I mean... e.g., try:
Code:
mm_changeItemProperty('MainMenu','TopOne',7,'#ff0000',1);

in your test. You'll get the color change as soon as the page loads. Now change the 1 to a 0 in the function's fourth parameter and try it again... you won't get the color change until you mouse over the "Top One" item.

Upshot... you could try forcing the color by changing the offbgcolor property, or you could wait until pagebgcolor is fixed (which probably won't be long).

Hope tyhat helps,

Kevin


Poster: rockmill
Dated: Wednesday January 28 2004 - 19:57:19 GMT

Thanks again Kevin,

I'm kinda glad it was a bug and not just me going mad!! Sorry about the boomerangs with RC50 + 75 (don't know where that came from). As you say, doing things over and over again, you start to see things!

I'm looking forward to the next release but will try and use your suggestion to get round it for now.

Thanks again.

Patrick


Poster: kevin3442
Dated: Friday January 30 2004 - 1:02:50 GMT

Hey Patrick,

Try the latest release, RC47... looks like pagecolor etc is back in order.

Kevin


Poster: rockmill
Dated: Monday February 2 2004 - 14:50:55 GMT

Hi Kevin,

Thanks for the pointer. You guys are really on the ball. By the time I downloaded the latest version it was RC48 and a new property called "pagematch" had suddenly appeared - just what I wanted.

Thanks a million!

Patrick