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

Second level submenu right align problem


Poster: James Bond
Dated: Wednesday December 7 2005 - 15:10:05 GMT

Hello,

After having spend half of my day going through the post of this forum I finally decided to post my quest.

I'm trying to use your absolutely magnificent menu and make it deal with several sublevels. Every sublevel should open to the right of its parent.

Now the firslevel opens nicely on the right of the root level.

But the second level opens with the same X coordinate as the root level.
Now I've tried using openstyle but without success.

Some help would be appreciated.
Please check the link for the complete settings :
http://dev.saintcergue.ch/index.php?lang=en&subject=1
The menu is on the leftside of the page. Just ignore the
"Oups. This page seemed to have been removed"

Thanks in advance

Linux is very user-friendly, it's just very picky about whom its friends are.


Poster: Ruth
Dated: Friday December 9 2005 - 6:28:40 GMT

Hi,

Really odd. I have reported this. It seems if you use menuStyle1 for both the main menu and the first submenu, you can then use menuStyle2 from that point on with no problem. I don't know why it shifts the menu over if you use the menuStyle2 in all the submenus.

I did find a workaround for now until whatever is causing it is fixed, though I could be missing something and you get a post with what is really causing the problem.

In your style sheet put the following class
Code:
.mybord{border:1px solid #000000;}


Then in your menu data file, change your menu 2 to this

Code:
with(milonic=new menuname("2")){
style=menuStyle1;
openstyle="up"
top="offset=1";
aI("status=My test;text=My test;url=http://dev.saintcergue.ch/index.php?subject=11;offclass=mybord;onclass=mybord;");
aI("showmenu=3;status=My test 2;text=My test 2;url=http://dev.saintcergue.ch/index.php?subject=12;offclass=mybord;onclass=mybord;");
}


That will put the black border around each item in that menu which is the only difference between the two styles.

Ruth


Poster: Ruth
Dated: Friday December 9 2005 - 7:09:16 GMT

Hi again,

OK, it seems I was wrong on any problem in the menu. There seems to be something wrong in your menu_data.js file. I tried again from the beginning and it works. So, try code below on the page. Also, you might move the call for the program files to immediately after the body tag.

Code:
<script>
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;

with(menuStyle1=new mm_style()){
itemwidth="155px";
itemheight="20px";
fontfamily="Verdana, Tahoma, Arial";
fontsize="11px";
fontweight="bold";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#CCCCCC";
offcolor="#000000";
onbgcolor="#663300";
oncolor="#996600";
padding=3;
pagebgcolor="#CCCCCC";
pagecolor="#black";
separatorcolor="#000000";
separatorsize=1;
}
menuStyle2=new copyOf(menuStyle1);
menuStyle2.itemwidth="200px";
menuStyle2.bordercolor="#000000";
menuStyle2.borderstyle="solid";
menuStyle2.borderwidth=1;


with(milonic=new menuname("2")){
style=menuStyle2;
openstyle="up";
top="offset=1";
aI("status=My test;text=My test;url=http://dev.saintcergue.ch/index.php?subject=11;");
aI("showmenu=3;status=My test 2;text=My test 2;url=http://dev.saintcergue.ch/index.php?subject=12;");
}

with(milonic=new menuname("3")){
style=menuStyle2;
openstyle="up";
top="offset=1";
aI("status=My test 2.1;text=My test 2.1;url=http://dev.saintcergue.ch/index.php?subject=13;");
}
      with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
style=menuStyle1;
position="relative";
aI("text=Home;url=http://dev.saintcergue.ch/index.php?subject=1;");
aI("showmenu=2;status=Access;text=Access;url=http://dev.saintcergue.ch/index.php?subject=8;");
}
drawMenus();
</script>


Ruth


Poster: James Bond
Dated: Friday December 9 2005 - 8:39:24 GMT

Hello,

Some people are good at the things they do. Some people are just better at the things others do. Finally there are people who are the best at what other people do.

Ruth, you (and the rest of the Milonic team), absolutely belong the latest category. THANX A LOT.

Cheers,

James Bond 007