submenu always visible based on selected area

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
paolus
Beginner
Beginner
Posts: 1
Joined: Tue Jun 06, 2006 11:01 pm

submenu always visible based on selected area

Post by paolus »

hi to all, here my issue, I'm trying to have submenus open in different are of the site, for example, I have 3 areas:
1st area
top menu:ME
submenu
my hobbies
my pictures
my movies
======
2nd area
top menu:YOU
submenu
your hobbies
your pictures
your movies
======
3rd area
top menu:US
submenu
our hobbies
our pictures
our movies

I would like to have the submenu already open in the specific area, so if I go to ME, the ME submunu is already open, then I go to YOU, and the YOU submenu open... can you control that from the html doc?

thank you in adance
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Please try adding the following module after your menu_data.js call:

<SCRIPT language=JavaScript src="openmenusbyurl.js" type=text/javascript></SCRIPT>

You can get this file from http://milonic.com/openmenusbyurl.js

This will automatically open menus based on currently selected URL

Hope this helps,
Andy
dbonneville
Advanced
Advanced
Posts: 22
Joined: Wed May 05, 2004 8:33 pm

Post by dbonneville »

If I'm using 2 menus (a vertical and a horizontal) how do I force open only one of the menus and not both?

Thanks,

Doug
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Given that the URLs would be the same in each menu for a given page, I'm not sure that's possible.
John
dbonneville
Advanced
Advanced
Posts: 22
Joined: Wed May 05, 2004 8:33 pm

Post by dbonneville »

So it's probably not possible to do this on a given subpage?:

Link | Link | Link | Link | Link

Link
Link
Link
sublink
sublink
sublink
Link
Link
Link

?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

John is correct. Others have asked about that and it is not possible as long as the two menus use the same URLs.

If you are only interested in having one data file open the submenus when it reaches the url, you might try this post

This was created before the openmenusbyurl module was available. It is a bit involved but if you have two menu_data.js files one for the horizontal and one for the vertical, then you should be able to use this method by putting it in only one of the data files. This would be in place of the openmenusbyurl.js module, not in addition to it.

This is a pretty involved method to explain, though once you get it done it shouldn't be a problem. However, please note, this is a user created method, it was done back in June of '04 so I have no idea if it will work with the newest versions of the menu. Also, all directions assumed one data file, so wherever it might say combine all definitions in the menu_data.js file that doesn't mean for you to combine your vertical and horizontal menus into one file.

Hope this helps. It's the only thing I can think that might work, though as I said it was done a long time ago so I don't know if it's compatible with the newest versions.

Ruth
Post Reply