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.
tree / Collapsing menu - strange behaviour - Help !
-
- Beginner
- Posts: 8
- Joined: Fri Sep 10, 2004 4:18 pm
- Contact:
- fredlongworthhighschool
- Mega Advanced
- Posts: 362
- Joined: Fri Jun 27, 2003 11:34 am
- Location: Manchester, England.
- Contact:
I see a couple of things.
In a number of your aI statements you have...
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...
I believe that should be...
In a number of your aI statements you have...
Code: Select all
aI("text=Advocacy;url=./advocacysrc.htm;target=BODYIFRAME;showmenu=Advocacy;type=tree;");
Also, you have...
Code: Select all
with(menuStyleSub=new copyOf(tstyle1)) etc.
Code: Select all
menuStyleSub = new copyOf(tstyle1) etc.
John
-
- Beginner
- Posts: 8
- Joined: Fri Sep 10, 2004 4:18 pm
- Contact:
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.
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.
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
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
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: Select all
singleMasterMenu="true";// Informs the system to only have one menu open at a time
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
Just a quick two cents....
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
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).Ruth wrote:You have a code in the collapse_data fileCode: Select all
singleMasterMenu="true";// Informs the system to only have one menu open at a time
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