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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:25

Strange offbackcolor problem


Poster: toen_work
Dated: Wednesday July 9 2003 - 17:23:41 BST

Hi all,

I'm using different background colors on the different items on the top level. My code generates to ","some text","show-menu=menu1","/default.aspx?id=2004 onfontcolor=000000;onbackcolor=bdd9e6;offfontcolor=000000;offbackcolor=bdd9e6",,1" and that looks fine. However, for some absurd reason, this doesn't work when I'm on the page linked to (i.e. default.aspx?id=2004 in the above example). The offbackgroundcolor is set to "ffffff", even though the code looks right. If I'm on one of the menues subpages, everything works, but I want it all!

Also, if I delete the link to the default-page, everything is fine and I'm running v3.5.15 if that is an issue.

I have probably made a really simple and stupid mistake, but I can't seem to find it. Can anyone help?

Re: Strange offbackcolor problem


Poster: toen_work
Dated: Wednesday July 9 2003 - 17:37:29 BST

Okay, an update. If I change the code to produce ","some text","show-menu=menu1","/default.aspx?id=2004# onfontcolor=000000;onbackcolor=bdd9e6;offfontcolor=000000;offbackcolor=bdd9e6",,1" it works as it's supposed to, but only 'til I actually click one of the # links. The page loads normally, but the coloring is lost. However, if I edit the address field by deleting the trailing "#", everything is hunky dory.

Any ideas, 'cause this is driving me nuts!!


Poster: toen_work
Dated: Wednesday July 9 2003 - 18:02:16 BST

I've experimentet some more and I get the exact same result if I try to change the offfontcolor. This looks more and more like a bug to me... :(


Poster: toen_work
Dated: Wednesday July 9 2003 - 18:42:10 BST

The problem is temporarily solved. For some reason, it works to append an ampersand to the link URL ("/default.aspx?id=2004&") when I'm on that specific page. Of course, if the user clicks the same item again (i.e. "/default.aspx?id=2004&"), the ampersand have to go in the menu code.

Conclusion, this problem can be solved by appending an ampersand to the link URL in the menu code if there is no ending ampersand in the address field. If there is, no ampersand should be appended.

I still consider this a freak bug however, so if anyone has a more elegant way to solve the problem, I'm all ears!

Tommy