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

tree / Collapsing menu - strange behaviour - Help !


Poster: paul.frear
Dated: Wednesday September 22 2004 - 18:07:20 BST

Hi all

I'm using the collapse_data menu, and it seems not to work in the way I would expect. If you click on another main menu header while a submenu is visible, this jumps to the wrong option

Any help

Example is at http://www.altrigen.com/clientaccess/eu ... xtree2.htm

You input would be greatly appreciated.

Paul Frear.


Poster: fredlongworthhighschool
Dated: Thursday September 23 2004 - 9:06:40 BST

I think the collapse / tree menu is still a beta.


Poster: John
Dated: Thursday September 23 2004 - 15:09:49 BST

I see a couple of things.

In a number of your aI statements you have...
Code:
aI("text=Advocacy;url=./advocacysrc.htm;target=BODYIFRAME;showmenu=Advocacy;type=tree;");

Note both a url and type=tree. With this setup the url will take you somewhere but the tree will never open.

Also, you have...
Code:
with(menuStyleSub=new copyOf(tstyle1)) etc.

I believe that should be...
Code:
menuStyleSub = new copyOf(tstyle1) etc.


Poster: paul.frear
Dated: Friday September 24 2004 - 16:50:55 BST

Hi John

I used a tree menu and a url, so the user can see the general outline page and also the sub option menu expanded when the user is on that page, which works fine. I see the page when selected, and the tree menu expands, which is exactly what you would expect from this type of menu.

The syntax I cut and pasted from the example supplied, also which seems to work as regards sub styles etc.

Any further help would be much appreciated.

Cheers
Paul.


Poster: Ruth
Dated: Sunday September 26 2004 - 20:28:00 BST

Hi Paul,
John is correct, the treemenu is in beta, still under development. I've played with it and I can tell you how to fix the problem but it introduces a different one. I am not a programmer so I don't know if I can explain clearly what's going on. You have a code in the collapse_data file
Code:
singleMasterMenu="true";// Informs the system to only have one menu open at a time

I notice that it is coded true, it would also have a false, I think you can also use 1 and 0. What that does is say when you click on a main item it will open the sub for that, and if you click on another main item it will close the previously opened sub if the code was set to true and open the new sub for the new main item. If it is set to false it will NOT close the previously opened sub and only open the new sub.

OK, this is what I'm seeing. If that item is set to true and you've clicked on About EUCARE, the click opens the submenu and opens that page in the iframe. Having done that, if you move now to a new main item, when you click it what is happening is that the function to close the first submenu kicks in, and the function to open the new submenu for this main item is taking place, but and the link function to open the newest page doesn't happen. That may be that the memory in the program is seeing the first main item submenu is open so it doesn't load a page from the second main item.

Two ways will make it work.

1. Click the first main item again to 'shut' it off and to close that submenu
2. Set your code to false, then all the pages will load as they are clicked, but all the submenus remain open for all items that were clicked to open a submenu until they are actually clicked to shut them off.

There might be some function that could be written to make the menu load whatever page is listed whenever an item is clicked no matter what functions are being performed by the menu at the time, but as I said, I'm not a coder so I do not know.

Since the treemenu is in beta this may also be something that is being worked out as the menu is developed.

Ruth


Poster: kevin3442
Dated: Tuesday September 28 2004 - 1:03:37 BST

Just a quick two cents....

Ruth wrote:
You have a code in the collapse_data file
Code:
singleMasterMenu="true";// Informs the system to only have one menu open at a time

true and false are boolean values. They should not be inside of quotes (doing so makes them a string value; not what you want when setting a boolean).

That was cent #1. Here's the second cent:

I don't mess much with the tree menu, but it seems to me that embedding the menu code in a table as you're doing may overly-complicate things. Especially if you embed all of the menu code in the table, which is not the approach recommended for table-bound menus in sample9 and the other "tablemenu" sample. Given the position of your menu, it seems to me that there's no pressing reason to have it in a table (don't really need relative positioning do you?)... it would probably do just fine outside of a table, positioning it using just the top= and left= menu properties. If you have to leave it in a table, you might try following the suggestions in the samples and leave just the main menu definition in the table, taking all of the other stuff out and putting it in a separate menu_data.js file.

Like I said... just two cents.

Kevin


Poster: Ruth
Dated: Tuesday September 28 2004 - 1:38:54 BST

:oops: I think I put the quotes in there. Sorry.

Ruth