topbarimage missing in source code

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mivilleb
Beginner
Beginner
Posts: 2
Joined: Wed May 21, 2003 6:35 pm

topbarimage missing in source code

Post by mivilleb »

Hi,

Here is a possible bug.

I downloaded version 4.0 Beta 1.12 and in the function mm_style you are collecting the value of subimage but not the value of topbarimage. The top bar image value is given the same value as subimage in your source code.

I was using the horizontal_data.js file where topbarimage is given a value arrow_down.gif (which does not exists by the way in your images directory, it should be arrowdn.gif) but the value is not used in your source code.

http://milonic.com/4beta/horizontal.htm

Thanks,

Bernard
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

This is something we have changed.

What you can do now is create copies of styles, change just 1 property and then this becomes a completely different style.

Here's the code.

Code: Select all

with(vertStyle=new mm_style()){
     onbgcolor = "#ffffcc";
       oncolor = "#000000";
    offbgcolor = "#7799ff";
      offcolor = "#00008b";
   bordercolor = "#000000";
   borderstyle = "solid";
      subimage = "images/arrow.gif";        
}

horizStyle=new copyOf(vertStyle)
horizStyle.subimage="images/3darrow.gif";
horizStyle.onsubimage="images/3darrow_down.gif";
What this does is create 2 styles. I know it's more code and probably not as simple as before but it is so much more felxible.

Cheers
Andy
Romeo
Advanced
Advanced
Posts: 25
Joined: Fri Jul 05, 2002 11:30 pm

Post by Romeo »

Hi Andy
Where do you place :

horizStyle=new copyOf(vertStyle)
horizStyle.subimage="images/arrowdn.gif";
horizStyle.onsubimage="images/downarrow.gif";

and do I need to rem out the standard syntax as below ?

//topbarimage = "images/arrowdn.gif";
//topbarimageloc = "right"
//subimage = "images/arrow.gif";
//subimageloc = "center;middle"

As I am still only showing one arrow regardless of what level you view.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

If anything is rem'ed out in the data file it's not needed so can be deleted.

I'll get a demo of top bar image posted to the beta hopefully later today.

Cheers
Andy
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Very cool code, Andy. Now we really need those docs!
John
Post Reply