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

Load button background image that corresponds w/ the page?


Poster: gplatt
Dated: Thursday June 15 2006 - 22:14:22 BST

Greetings,

What I wish to do is load a particular background image for each menu button depending on the page currently being viewed. Basically, I'm looking to "highlight" a button in a menu contructed of images the same way in which a text-only menu can change the background color of a button so that it corresponds with the current page.

The site I am working on is http://www.oberlin.edu/dormenergy/asia.htm Here, for example, I wish to have the "Individual Dormitories" button on the main menu remain blue (replaced with the blue background image that you see when mousing over) when visiting any of the links residing within that level of the menu. Would this require an external .js file?

Any ideas (or source files where it has been accomplished before) would be greatly appreciated. Thanks!!

gplatt


Poster: Ruth
Dated: Thursday June 15 2006 - 23:39:58 BST

Hi,

You can do that by using the pagematch, pagebgimage and pagecolor properties of the menu. You'd add that to the aI string. So, for the one you showed the aI string would be

Code:
aI("showmenu=Dormitory Comparisons;pagematch=original.htm;pagebgimage=2_top_on.png;pagecolor=#CEE8FB;overbgimage=2_top_on.png;bgimage=2_top_off.png;text=Dormitory Comparisons;");


Note that I used a light blue for the pagecolor just to show you the options. You might use yellow, which is on that page, also, or maybe red or any other color. I did that to make it stand out in a different color than the off and on font colors of the menu. But, you can just make it white like the oncolor is.

Ruth


Poster: gplatt
Dated: Friday June 16 2006 - 3:45:06 BST

Thanks much for the quick reply and helpful assistance :)

Just a note, the page properties seem to be case sensitive, so hex color values need to be lowercase. I now notice that there are three other page settings in the style guide (I hadn't even noticed them there before!)

gplatt


Poster: Ruth
Dated: Friday June 16 2006 - 5:13:32 BST

Hi,

The menu has no case sensitivivity for colors. Uppercase/lowercase it's all the same to the menu. What I posted is exactly how it is in the file which I tested in IE, NN, FF, and Opera. As far as I know to a browser #FFFFFF and #ffffff are the same.

Ruth