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

Dynamically switch submenu orientation


Poster: screenmates
Dated: Saturday February 3 2007 - 9:29:46 GMT

How do I switch the orientation of all the submenus from vertical to horizontal and back at runtime? The main menubar should always be horizontal, though. I'm looking to switch the orientation of just the submenus. By the way, the submenus when oriented horizontally, should start their left most item synched with the left property of the main menubar (_subOffsetLeft) which is 0 in our case and not right under the currently highlighted menubar item as some examples do. Any API function that can do this?

TIA


Poster: Ruth
Dated: Saturday February 3 2007 - 19:45:37 GMT

Hi,

You might want to take a look at this page, the demos at the top part

http://support.milonic.com/demos/

Probably the change menu property and change item property. Most of these demos were created by another volunteer, Kevin who unfortunately has little time these days to do much on hte forum. I do not know anything about these and can't help but perhaps they will give you some ideas.

There are also posts related to the change menu/item properties that you could find with a search, for example this one, though I don't know if it has anything to do with what you want, it's about changing a url.

There are also topics about the menueditapi.js module, that has to do with changing, adding, editing items or menus.

http://www.milonic.com/forum/viewtopic.php?t=3442#14348


Ruth


Poster: screenmates
Dated: Sunday February 4 2007 - 23:32:01 GMT

Thanks much, Ruth. I was able to change the submenu orientation to horizontal but still trying to figure out how to go about making the current submenu alwaysvisible. Maybe, I'll try writing/reading a cookie with JS.

Horizontal submenus starting at 0 is not an issue as they are nicely positioning withing the window on the right. However, I have menubar items with 100px and submenus 150px width. I was trying to set the itemwidth of the current submenu items to 100 on changing to horizontal orientation so they align with the menubar nicely and set them back to 150 on changing to vertical but wasn't successful on this one.

I noticed on changing the orientation to horizontal, the other submenus are going behind dropdown form selects. Also, I noticed using tooltips.js is causing the submenus go behind form selects. Maybe a possible glitch. I know you folks need a URL to validate the error and I'll let you know when I'm done setting up one as there is nothing as yet.

Regards,


Poster: Ruth
Dated: Monday February 5 2007 - 3:53:35 GMT

Hi,

There's a module called openmenusbyurl.js which will keep a submenu open if the url of an item matches the url of the page.

It's under the bolt-on modules page from the DHTML Menu link on the main site.

I think that's the only thing you need if you got the other to work. You should also be able to change the main item to a header type with the changeItemProperty function in the demos. -I think, since I really am not conversant with js.

Ruth