openstyle="up" with listmenus.js

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
debris123
Beginner
Beginner
Posts: 2
Joined: Wed Oct 17, 2007 10:41 am

openstyle="up" with listmenus.js

Post by debris123 »

Hi!
Thanks for your work on your DHTML Menu. I've used it successfully on a couple of projects. My most recent project is based on Typo3 (typo3.org) to generate the DHTML Menu I opted for the buildListMenu() function as it offers accessability and is easily implemented through Typo3.
My problem is that the designer layouted the site for an upwards opening menu. I have not been able activate this in a list based setup. In other setups I add openstyle="up" in the menu_data.js (eg. with(milonic=new menuname("Unternehmen")){ openstyle="up";...})
I didn't find anything in the forums so I hope I'm not asking smth. obvious.
Here's the current contents of my menu_main.js (all openstyle='up';s without effect)

Regards,
Fabian

Code: Select all

//fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

with(menuStyle=new mm_style()){
bordercolor="#fff";
borderstyle="solid";
borderwidth=0;
fontfamily="Arial";
fontsize="0.8em";
fontstyle="normal";
fontweight="bold";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#D60083";
offcolor="#fff";
onbgcolor="#95005B";
oncolor="#fff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);";
padding=0;
pagebgcolor="#95005B";
pagecolor="#ffffff";
separatorcolor="#ffffff";
separatorsize=2;
//subimage="arrow.gif";
subimagepadding=2;
offclass="mmmenuoff";
onclass="mmmenuon";
}

with(submenuStyle=new mm_style()){
openstyle='up';
borderwidth=1;
bordercolor="#c0c0c0";
offbgcolor="#ffffff";
fontfamily="Arial,Helvetica,sans-serif";
fontsize="11px";
fontstyle="normal";
offcolor="#898989";
oncolor="#D60083";
outfilter="randomdissolve(duration=0.5)";
overfilter="Fade(duration=0.2);";
padding=4;
image="/fileadmin/templates/img/snav_off.gif";
imagepadding=3;
overimage="/fileadmin/templates/img/snav_on.gif";
pagebgcolor="#ffffff";
pagecolor="#D60083";
pageimage="/fileadmin/templates/img/snav_on.gif";
pageclass="pageon";
//onbold=1;
}

buildListMenu("menuid","menuStyle","screenposition='center';top=142;left='offset=19';alwaysvisible=1;
orientation='horizontal';style=menuStyle;menuheight = 23;itemheight = 23;itemwidth = 110;
align='center';openstyle='up';");
debris123
Beginner
Beginner
Posts: 2
Joined: Wed Oct 17, 2007 10:41 am

Re: openstyle="up" with listmenus.js

Post by debris123 »

Hello.
I fiddled around in listmenus.js. I altered line 68 from:

Code: Select all

if(_y3[_a].mS)_y6+="style="+_y3[_a].mS+";";else _y6+="style="+_sty+";";
to:

Code: Select all

if(_y3[_a].mS)_y6+="openstyle='up';style="+_y3[_a].mS+";";else _y6+="style="+_sty+";";
also works:

Code: Select all

if(_y3[_a].mS)_y6+="openstyle='up';style="+_y3[_a].mS+";";else _y6+="openstyle = 'up';style="+_sty+";";
I will now probably alter buildListMenu() to accept openstyle as argument.

Regards,
Fabian
Post Reply