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: Thursday February 8 2018 - 06:02:20

Weird styles appearing


Poster: mothra
Dated: Saturday November 1 2003 - 1:52:04 GMT

http://www.cinequest.org/2004/index.html displays a weird style for "Home", where it appears as blue bkgd and red type. It also appears like this in the first item of its submenu. Appears in Safari and IE (OS X). I can't get rid of it.

and if I copy the script from another page, like http://www.cinequest.org/2004/filmmaker ... akers.html
the bug remains on the home page.

Any thoughts on how to get around this?


Poster: John
Dated: Saturday November 1 2003 - 6:14:29 GMT

Your main menu code on the home page calls for menuStyle. In that you have defined...

Code: Select all

pagecolor="red";
pagebgcolor="blue";

Since you have the v5 code on only the home page right now, whenever you are on that page the above code kicks in. Remove those 2 lines, or, if you want this 'tracking' feature, change the colors to something more appropriate.

See http://milonic.com/forum/viewtopic.php?t=2981 for suggestions for some good reading.


Poster: mothra
Dated: Saturday November 1 2003 - 7:23:56 GMT

What's strange, is this only happens on the first link, and the first sublink. The way the script is set-up, it seems it should affect all the links the same way, no?

In the index.html:

<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
alwaysvisible=1;
orientation="horizontal";
overfilter="";
position="relative";
aI("text=Home;oncolor=#66cc00;url=http://www.cinequest.org/2004/index.html;showmenu=festinfo;");
aI("text= | ;showmenu=s;");
aI("text=Program Guide;oncolor=#3366ff;url=http://www.cinequest.org/2004/program/program.html;showmenu=program;");
aI("text= | ;showmenu=s;");
aI("text=Venues and Dining;oncolor=#ff0000;url=http://www.cinequest.org/2004/venues/venues.html;showmenu=venues;");
aI("text= | ;showmenu=s;");
aI("text=Filmmakers;oncolor=#ff6600;url=http://www.cinequest.org/2004/filmmakers/filmmakers.html;showmenu=film;");
aI("text= | ;showmenu=s;");
aI("text=Media;oncolor=#66cc00;url=http://www.cinequest.org/2004/media/media.html;showmenu=media;");
aI("text= | ;showmenu=s;");
aI("text=Partners;oncolor=#ffcc00;url=http://www.cinequest.org/2004/partners/partners.html;showmenu=partners;");
aI("text= | ;showmenu=s;");
aI("text=Members;oncolor=#9933cc;url=http://www.cinequest.org/2004/members/members.html;showmenu=members;");
aI("text= | ;showmenu=s;");
aI("text=About Us;oncolor=#cc9966;url=http://www.cinequest.org/2004/members/members.html;showmenu=about;");
}

drawMenus();

</script>


=====

And in menu_data.js:

with(menuStyle=new mm_style()){
onbgcolor="white";
oncolor="black";
offbgcolor="white";
offcolor="#666666";
bordercolor="white";
borderstyle="white";
borderwidth=0;
separatorcolor="white";
separatorsize="0";
padding=1;
fontsize="10";
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="white";
pagebgcolor="white";
headercolor="white";
headerbgcolor="white";
subimage="";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}


Also, I can't see my script updated when I hit the reload button, but I have to start from the site root URL to have the menu reappear at all.


Poster: Andy
Dated: Saturday November 1 2003 - 10:07:35 GMT

Just looked at this but it appears to be fine now.

Did you manage to fix it?

-- Andy


Poster: mothra
Dated: Saturday November 1 2003 - 15:50:27 GMT

It's still not working. "Home", the first link is completely white in its off state (as is it's first sublink). But I wonder why the styles wouldn't affect the entire menu?


Poster: kevin3442
Dated: Sunday November 2 2003 - 5:28:04 GMT

Hi Mothra,

It's not a bug. The menu system is actually doing exactly what you coded it to do in your styles; specifically, by setting pagecolor="white" and pagebgcolor="white" in menuStyle (the style used by your Main Menu) and in submenuStyle (the style used by your "festival" submenu). I think the root of the issue is that you don't quite understand the purpose of the pagecolor and pagebgcolor style properties. If you remove those two lines from the styles, as John had mentioned, then you will see that the behavior goes away. It seems as if you think that the pagecolor and pagebgcolor properties affect colors on the page, outside of the menu. An easy misconception I guess, given the names of the properties. But that's not what they do.

From the docs:

pagebgcolor Sets the Current Page Menu Item Background Color for any global menu style. This property, when declared, will change the background color of a menuitem if the URL matches the current URL. This is useful for indicating to the user where in the menu they need to go to navigate to this page

pagecolor Sets the Current Page Menu Item Font Color for any global menu style. This property, when declared, will change the font color of a menuitem if the URL matches the current URL. This is useful for indicating to the user where in the menu they need to go to navigate to this page

So, when you are on a page, any menu item -- defined with aI() -- whose url= setting matches the currenly displayed page's URL will be affected by the pagecolor and pagebgcolor properties of the style you assign to the menu (if those properties are present). Take your "Home" menu item in the Main Menu for example. The Main Menu is assigned a style named menuStyle, which has pagecolor="white" and pagebgcolor="white". The "Home" item in the Main Menu is defined as follows:

Code: Select all

aI("text=Home;oncolor=#66cc00;url=http://www.cinequest.org/2004/index.html;showmenu=festinfo;");

Note that the url for that item is http://www.cinequest.org/2004/index.html. Therefore, when you are viewing the page, http://www.cinequest.org/2004/index.html, the "Home" menu item -- whose url matches the page you are viewing -- has it's background color changed to white (pagebgcolor in menuStyle) and its font color changed to white (pagebgcolor in menuStyle). Of course, this renders "Home" invisible on your site, since the body's background color is white.

So what about the submenu? The "Home" menu item in the Main Menu opens the "festinfo" submenu, which you've assigned a style called submenuStyle, which also has pagecolor="white" and pagebgcolor="white". The first item in the "festinfo" submenu is defined like so:

Code: Select all

aI("text=Festival Info;url=http://www.cinequest.org/2004/index.html;");

Note the url= setting for that meni item... also http://www.cinequest.org/2004/index.html. So, once again, when you are viewing http://www.cinequest.org/2004/index.html, the "Festival" item in the "festinfo" submenu will take on the colors specified by pagecolor and pagebgcolor in submenuStyle: "white" and "white".

These two properties, pagecolor and pagebgcolor, are meant for the site visitor to easily distinguish which menu item or items were used, or could have been used, to get them to the page that they are currently viewing. Sort of like a visual indicator of "you are here in the menu system." If you don't care to use this "breadcrumb trail" feature, the easiest thing to do would be to delete the pagecolor and pagbgcolor assignments from your styles.

Hope that helps to clear things up.

Kevin


Poster: mothra
Dated: Sunday November 2 2003 - 17:23:34 GMT

Thank you Kevin, that really helped to point out the specific fix I needed to make. Frankly, it was an option I had never expected with this menu (so many options!). Now it works very nicely! Worth the money we spent on it.

One question though, is that under the menu, there is a Flash file, and it seems that it covers the About Us sub menu--a layer rotation of some kind is happening here. If anyone knows a possible workaround, I would appreciate any tips.

Thanks,
Tom


Poster: Hergio
Dated: Sunday November 2 2003 - 20:40:44 GMT

Do a search on the forums for hidding flash and setting the wmode in the flash object. It has been covered before. THere are some instances when it doesnt though, and I believe in the latest release Andy may have fixed it and will dfocument it soon.


Poster: mothra
Dated: Sunday November 2 2003 - 20:46:58 GMT

Great, thanks.