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: Thursday February 8 2018 - 06:02:28

pagecolor menu item override not working


Poster: cubefree
Dated: Monday August 25 2003 - 11:14:00 BST

I believe I have found a bug in this menu item attribute. If you go to:
http://www.cubefree.com/clients/providence/proginfo/coreplan/eligibility.asp you'll see that the nav item Eligibility is not highlighted red #660000, as it should. It stays blue #003366 per the style array.

This item is governed by the following code:

Code: Select all

   tierID = 1120;  //Eligibility
   aI("image="+ipath+"leftnav_bullet_"+((url.indexOf(aURLid[tierID])>0)?"on":"off")+".gif;overimage="+ipath+"leftnav_bullet_on.gif;text="+aNavTitle[tierID]+";fontsize=11px;separatorsize=0;pagecolor=#660000;url="+aURLid[tierID]+";");


Sorry I know this code is a bit complex, as I am not using the leftnav as a cascading menu, but more to show state -- as well as offer visible links in the same tier of navigation. Also the nav is called in via an array with an ID. It just seemed more effecient to use an ID in nav item rather than set cumbersome, URLs.

In fact, this yields another question... Is there a way to have 2 or more visible vertical menus and have them rest immediately under each other WITHOUT setting the top and left pixel attribute for the 2nd (or more) menus. I'd rather just use an offset BUT -- as you know, normally offset is used for a cascading menu within another.

Any takers?
~cubefree


Poster: Hergio
Dated: Monday August 25 2003 - 15:30:30 BST

First off, I your milonic_src file looks like its RC5...but your menu_data looks alittle outdated. For instance, I see the _c=1 is still on the end of menu declarations, I know Andy removed this in a previous RC, and I am not sure which one, but make sure your menu declaration file is up to date too.

I think your problem is your styles....if you'll notice you're main style which is used by the menu in question has a pagecolor defined as 003366 (btw, thats the color of the Eligibility link), and then you define pagecolor again in your menuitem. You are only supposed to declare it once, you cant have it in more than one area. As we see in this case, the actual style overrides your aI pagecolor setting...try removing the pagecolor from the style and using it exclusively in the menuitems, or keep it in the style.


Poster: cubefree
Dated: Monday August 25 2003 - 18:13:03 BST

Thanks for checking it out, but those _c-1 where in the horizontal menu. I am concerned with the left vertical one. In any case, I took them out and reviewed the code per the latest download. Thx.

But I would think that if the documentation offers pagecolor as a menu item property, it would override the style like the others. It does not. I tried only including it in each menu item. That did not work either -- pagecolor seems to be a resilent property.

You can see that try here:

http://www.cubefree.com/clients/providence/proginfo/coreplan/at_a_glance2.asp


Poster: Hergio
Dated: Tuesday August 26 2003 - 21:00:19 BST

Looks like that may be a little bugger. But since you have similar menu items in the horizontal menu too, I would just make sure its not because you have two very similiar menus on the page.

Also, Try using the pagecolor from a style only. Why do you need separate pagecolor attributes...the point of the pagecolor style is to highlight the page (and hierarchy) the current page lies under. And they shouldnt need to be different colors since only one at a time should be highlighted.
But I should say, since you are doing things SO dynamically right now, what would be the trouble of setting the foreground color of the menu item on the fly? You're already checking to see if the menu item is the one being viewed, right?
Luck to you. ;)


Poster: cubefree
Dated: Thursday August 28 2003 - 1:23:34 BST

Hergio, re:
Hergio wrote:But I should say, since you are doing things SO dynamically right now, what would be the trouble of setting the foreground color of the menu item on the fly? You're already checking to see if the menu item is the one being viewed, right?
Luck to you. ;)


Yes, I did that. I wanted to make things more efficient which is why I wanted to define pagecolor in the style, and define pagecolor for the few odd nav items that require menu-item overrides. The problem is my background on these odd items is 003366, so is my pagecolor, thus the problem... the text disappeared into the 003366 blue.

Which is how I noticed the bug in the first place. However, I reviewed the style names I've given to make sure this is double naming. There is not.

Seems it's showing state properly, but menu-item pagecolor does not override.

I also used the the current V5 download and tried the same thing with Andy's files, See:
http://www.cubefree.com/clients/menu/pagecoloroverride.htm

Navigate to /Menu Samples/Page Color Override (first link in the submenu). I set the code as follows:

Code: Select all

aI("text=Page Color Override;pagecolor=#660000;url=pagecoloroverride.htm;");


It should be brick red text. Nada = bug.


Poster: cubefree
Dated: Friday August 29 2003 - 21:42:25 BST

Well according to Andy...

pagecolor and pagebgcolor are not passed within the aI text string.

This is why they do not change as expected.

We may introduce this into the next version or produce a function that will allow you to change the color on the fly.

Hope this helps
Andy Woolley
Milonic Solutions Ltd


Poster: Hergio
Dated: Sunday August 31 2003 - 18:33:24 BST

Ok, I gotcha, they are on the menu items quick reference, thats why I kept trying to help you fix the problem. Note to Andy, we need to remove the pagecolor and pagebgcolor from the menu item quick reference page, its misleading. At least for the time being, since I am sure it can be implemented relatively easily.


Poster: Andy
Dated: Sunday August 31 2003 - 19:06:58 BST

Better still, I'll get the menu to use them.

They were put in there for a reason so it's probably one of those things that just got forgotten about.

Leave it with me and I'll get in the next release.

Cheers
Andy