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

Multiple "subOffset" values?


Poster: bparrish
Dated: Friday December 3 2004 - 17:07:49 GMT

Hi there! Brand new to Milonic menus, so I apologize if this is a FAQ, or even just a stupid question:

Is there a way to have one layer of submenus have different _subOffset values from another in the same menu? For example, if I wanted the set of menus right underneath the main menu line up flush with the main menu, but any submenus IN those submenus, I want to overlap, can I do that?

I didn't see anything in the reference for an "offset" menu parameter, but perhaps I missed it.

Thanks for the help.


Poster: Ruth
Dated: Friday December 3 2004 - 18:50:52 GMT

If you are using a horizontal menu, the first level submenus will align immediately under the main menu and then the suboffsets you set will refer to the next level menus that drop off the first sub level. If you are using a vertical menu you can set the _subOffsets to what you want the 1st sub level to be coming off that menu, then you can set the top and left positions of the next levels by using the following code in the menu itself right after the style=
Code:
style=whateverstyle;
top="offset=Xpx";
left="offset=Xpx";
THe X of course will be what you want the submenu offset to be. I just tried that with the downloaded sample and it works in Netscape 6.1, 7.1, Opera 7.11, Firebird .07 and IE5.5

Ruth

offset first dropdown menu


Poster: kbourzikas
Dated: Wednesday December 15 2004 - 17:19:25 GMT

Hello.
I saw this post and I am trying to do something similar. I want to offset the first drop down dynamically so that it will change when the page is resized. What I am trying to do is create a variable with...

Code:
var winRight = document.body.scrollWidth;


and place this in the left= winRight like this...

Code:
with(milonic=new menuname("Connections")){
style=subStyle;
top=0;
left="winRight - 560";
aI("text=Message Center;url=/menusample1.php;");
aI("text=Address Book;url=/menusample2.php;");
}


Here's the problem, it works when it is first loaded but it doesn't refresh if the screen is resized. For example, it sets the left property to where the menu is first instantiated but if the browser is resized, the nav bar moves with the screen because it isn't set to one position but the drop down menus stay in the same place.

I also tried
Code:
left="document.body.scrollWidth; - 560";
but doesn't seems to work at all. It doesn't seem to take the document.body.scrollWidth command and places it at the zero position.

Is there a way to dynamically refresh the location of the drop down menu without refreshing the page?


Poster: Ruth
Dated: Wednesday December 15 2004 - 19:48:59 GMT

I'm not sure I understand why you're trying to do that with the first drop down. It will change automatically when the page is refreshed/resized without any kind of function. If the main menu is say screenposition="center"; then if the page is resized the menu shifts to center of the new size and the drop downs follow it. If you have a test page and url it would be more helpful to see what it is you want to do. Without understanding what it is, perhaps you need some function that says something like on resize reload the page again?

Ruth


Poster: kbourzikas
Dated: Wednesday December 15 2004 - 23:07:55 GMT

It's kind of hard to explain and my sample is on a secure network. What I want the menu to do is popup on a certain area below where the menu normally loads. The idea is that when a person click the menu it will almost act as a reminder on the page so that it is near a form in the bottom/middle of the page, kind of like an alert. Plus I could give them options or help with the buttons. But because it's html and moves when the page is resized, i want the menu to do the same.

I have a function that is almost what you said. On resize, change this variable (winRight) to the width of the window minus the offset (winRight - 560). It's just that I can't refresh the page because the information on the form will be deleted. And instead of dealing with forms and submit, I could help them. I will try to set up an example for you to see.

So instead of reloading the page, I thought I would try to change the menu variables left and top on-the-fly. Are the menus in Milonic V 5.63 (this is what I am using) generated once when the page is loaded and can't be changed?


Poster: Ruth
Dated: Thursday December 16 2004 - 3:26:35 GMT

The example would really help. I am understanding your explanation but not really getting what's happening or not happening. Sorry.

Ruth