Active image change

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
basic
Advanced
Advanced
Posts: 24
Joined: Thu Apr 21, 2005 6:12 am

Active image change

Post by basic »

Hi,
I have two images for the top level of the menu at http://www.basiconcept.com/sites/pws/en ... efault.asp and the hover efect looks nice. However, when I click on e.g., Forms or Contact, I get an active, blue button with hybrid of the two images instead of just the white image. The style code looks like this:

Code: Select all

with(menuStyle=new mm_style()){
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=0;
fontfamily="Arial, Verdana, Tahoma";
fontsize="12px";
fontstyle="bold";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#ffffff";
offcolor="#000000";
onbgcolor="#11499C";
oncolor="#ffffff";
overfilter="Fade(duration=0.1);Alpha(opacity=100))";
padding=5;
pagebgcolor="#11499C";
pagecolor="white";
separatorcolor="#ffffff";
separatorsize=1;
image="images/orangedots.gif";
imagepadding=2;
overimage="images/whitedots.gif";
clickimage="images/whitedots.gif";
padding=4;

Any ideas?

Thank you,

Gil.
slackbladder
Super Advanced
Super Advanced
Posts: 72
Joined: Fri Jul 01, 2005 3:04 pm

Post by slackbladder »

I could be wrong here but clickimage works only when you CLICK on the menu link?

Try using pageimage:

first remove:

clickimage="whitedots.gif";

from menuStyle

Then add pageimage=whitedots.gif to all your 'Main Menu' items

EXAMPLE:
aI("text=Contact;url=contact.aspx;pageimage=whitedots.gif");
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi Gil,

Slack is right. But, you don't have to put it in the aI string, you can put pageimage="whitedots.gif"; in the menuStyle section of the menu_data.js file. Also, if for some reason you need the clickimage for something you can leave that and just add the pageimage= in addition to it.

Ruth
slackbladder
Super Advanced
Super Advanced
Posts: 72
Joined: Fri Jul 01, 2005 3:04 pm

Post by slackbladder »

Sorry Ruth - you are right. I have been playing with pageimage but using DIFFERENT images for each menu heading. :D Basic is using the same image for his menu.
basic
Advanced
Advanced
Posts: 24
Joined: Thu Apr 21, 2005 6:12 am

Thank you!

Post by basic »

Thank you -

you are helpful as always...

Gil.

:D
Post Reply