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:04
submenu always visible based on selected area
Poster: paolus
Dated: Tuesday June 6 2006 - 23:29:57 BST
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
Poster: Andy
Dated: Thursday June 8 2006 - 10:56:47 BST
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://www.milonic.com/openmenusbyurl.js
This will automatically open menus based on currently selected URL
Hope this helps,
Andy
Poster: dbonneville
Dated: Monday June 19 2006 - 17:51:27 BST
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
Poster: John
Dated: Monday June 19 2006 - 19:35:54 BST
Given that the URLs would be the same in each menu for a given page, I'm not sure that's possible.
Poster: dbonneville
Dated: Monday June 19 2006 - 20:01:28 BST
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
?
Poster: Ruth
Dated: Monday June 19 2006 - 20:10:15 BST
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