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

Forcing Menu to pagecolor & pagebgcolor


Poster: bling69
Dated: Friday July 16 2004 - 16:18:02 BST

:D

Hi Folks,
I have an issue with implementing this wonderful menu.
At present, due to the way I have had to build the menu data in the jsp, when a sub-menu item is clicked, the top level item does not change from offbgcolor & offcolor to pagecolor & pagebgcolor. This works correctly when the top level is selected.
Is there a method for forcing a top level menu item to set to pagecolor & pagebgcolor?
I can easily identify the correct menu item but need to get the correct function to or property to set.
Thanks
Bling (First time user first time poster)


Poster: Maz
Dated: Friday July 16 2004 - 16:47:45 BST

The property pagematch=mypage.html;

will match the page for you.
Or a script for more than one page?
maz


Poster: bling69
Dated: Wednesday July 21 2004 - 8:59:57 BST

Thanks Maz, I will let you know how I get on.
Bling :D


Poster: bling69
Dated: Wednesday July 21 2004 - 16:52:44 BST

Hi again, I am still having troubles.
I made a mistake in my first posting.
When a user clicks on the top level of the menu a new page opens. On that page are "Editorial" links. The Editorial links are grouped together logically to the top level menu options but have no reference in the menu.

When using Milonic Menu at the moment when an Editorial link is clicked the menu loses the pagecolor & pagebgcolor, which is fair enough.

So what I am trying to do is force the pagematch to be the same URL as the Editorial.

The URL I am trying to use pagematch with is as follows,

Quote:
http://localhost:8080/intranet/editorial/read.do?id=280


This is a dynamically created and I managed to get the correct values into the aI() code when the Javascript is run by using the following;

Code:
aI("text=Business Management;url=/intranet/editorial/list.do?id=8;showmenu=Links1;pagematch="+location.href+";");


with location.href =
Quote:
http://localhost:8080/intranet/editorial/read.do?id=280


is this the correct way of working with pagematch?


Poster: Maz
Dated: Thursday July 22 2004 - 3:36:26 BST

It looks like it might work, there were some posts similar to that, but what you shouldn't do in a menu item, is the quotes "", so take out the quotes and see if that works.

Otherwise someone who knows backend, php or whatever it is, will have to help you.

maz


Poster: bling69
Dated: Friday July 23 2004 - 16:12:02 BST

Hi again,
I couldn't get the above to work so I had a fresh look at it and decided to do the following.
As I know which menu has been selected I simply change the colour of that menu when I generate it by using the code below, (this is JSP but I am sure you could use this in php etc):
Code:
<logic:iterate id="websitearea" name="websiteareas" indexId="webIndex">
<logic:equal name="websitearea" property="id" value="<%= String.valueOf(thisId) %>">
   aI('text=<bean:write name="websitearea" property="name"/>;url=/intranet/editorial/list.do?id=<bean:write name="websitearea" property="id"/>;showmenu=Links<%= (1+webIndex.intValue()) %>;offbgcolor=#990000;offcolor=white;');
</logic:equal>

<logic:notEqual name="websitearea" property="id" value="<%= String.valueOf(thisId) %>">
   aI('text=<bean:write name="websitearea" property="name"/>;url=/intranet/editorial/list.do?id=<bean:write name="websitearea" property="id"/>;showmenu=Links<%= (1+webIndex.intValue()) %>;');
</logic:notEqual>
</logic:iterate>


So just change the foreground and text colour to the highlight coulours when it is needed, not to pretty but jobs a good'n'!
Bling
:)