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

How do I open a treemenu by default?


Poster: dyma97
Dated: Wednesday January 5 2005 - 15:57:17 GMT

Is there a way to control which menu is opened (collapsible tree menu) via javaScript?

It seems I should be able to use treeMenuDisplay(), but I am not sure what to pass. This is what I am currently trying.

treeMenuDisplay(af_150, 'Show');

The result is Error: 'af_150' is undefined

My site is:

http://askafpc--pro.custhelp.com/cgi-bi ... prods6=157

There are any number of different tree menus that can be displayed based on which item is selected from the top menus.

I would like to dynamically open menus when the page is loaded based on the parameters that are passed. I can handle writing the correct js call via PHP as long as I know the correct parameters. Additionally, if I need to pen a menu that is "level 3" would I need to open its parent menu(s) first?

Thanks for everyone's help.


Poster: Ruth
Dated: Wednesday January 5 2005 - 22:11:51 GMT

I'm not sure this will help, since you are way above my level of understanding, but there is a function for the regular menu that auto opens subs when the page to which they are linked are open. Maybe that would give you some direction?

Ruth


Poster: dyma97
Dated: Thursday January 6 2005 - 15:46:51 GMT

Ruth,

That's not exactly what I am looking for although it is useful for a different issue I am having.

I guess the simplified question is, does anyone know what function opens a tree submenu and the parameters it requires?

The followup to this is if I make a call to open a nested menu, will it's parents open as well? I'm sure that once the first question is answered, the second will be evident.


Poster: Ruth
Dated: Saturday January 8 2005 - 6:19:36 GMT

I'm not a function person, but I think if you open the treemenu.js file you will see the function used to open the submenus. It starts with
Code:
function treeMenuDisplay(_mnu,_show){                      // This function hides or shows the menu
and then has a bunch of stuff after that.

Ruth


Poster: stuart
Dated: Sunday September 11 2005 - 14:22:45 BST

I believe the treeMenuDisplay function is looking for an integer as its first parameter being the integer value of the menu

I am haveing problems getting this to work as well.

Did you every get a solution to this?

I don't get any errors but the function appears to do nothing.

Stuart


Poster: starmetheus
Dated: Tuesday September 13 2005 - 18:54:17 BST

the new version of treemenu.js seems to take care of this.

from the release notes:
Added new methods to the treemenu.js module, openBranchByName(), closeBranchByName(), clickBranch(), openAllBranches and closeAllBranches() modules, documentation to follow

I tried using openBranchByName() and it worked like a charm.


Poster: indra
Dated: Wednesday April 5 2006 - 17:13:11 BST

I plan to use the treemenu (collapsible menu) on our website. I showed it to my manager and he had 2 requests: allow users to expand all and once it's all expanded, it should remained expanded when navigating to other pages.
The openAllBranches may take care the first request. Is there a way to have collapsible menu to remain open (all branches) until the click a link to close all?

Thank you


starmetheus wrote:
the new version of treemenu.js seems to take care of this.

from the release notes:
Added new methods to the treemenu.js module, openBranchByName(), closeBranchByName(), clickBranch(), openAllBranches and closeAllBranches() modules, documentation to follow

I tried using openBranchByName() and it worked like a charm.


Poster: Migru
Dated: Wednesday April 5 2006 - 18:58:11 BST

Hi

look at this please

http://www.milonic.com/treemenu/tree/

though its the tree - sample (and not the collapsible) the technique required for opening and closing might be the same.

Michael


Poster: indra
Dated: Wednesday April 5 2006 - 19:12:38 BST

I had looked at the sample. I know how to open all branches. Once it's open I want it to remain open as users navigate to other pages. Thanks for trying.



Migru wrote:
Hi

look at this please

http://www.milonic.com/treemenu/tree/

though its the tree - sample (and not the collapsible) the technique required for opening and closing might be the same.

Michael