I'm not sure what exactly you mean by "expansion". If
you're wondering what exactly happens when you try to expand
a submenu it's a call to function MTMSubAction() through the
onclick-event of the item's link. This in turn changes the
item's .expanded property as needed, then it sets the
MTMClickedItem variable so the submenu can be shown as
expanded/closed, and lastly it checks if it needs to call
MTMDisplayMenu() to refresh the menu display.
If you want a specific submenu expanded by default, just set
the second argument of makeLastSubmenu()/makeSubmenu() to
'true', as mentioned in the install guide.
If you set MTMCookieName it'll also store the menu state in
a cookie so it's expanded when the user returns.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
with 1-4-4 highlighted. So I guess what you are telling me
is that by setting the 2nd argument in makeSubmenu(1-4-4,
x) to be true in the onload that this menu will be expanded
to this point?
Thanks for the response!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually there seemed to be functionality already built in
such that if the text frame url was the same as one of the
items in the toc then the toc would expand to that item.
My problem was that my query parameters were different on
the url between the text frame and the urls in the toc
frame thus making the string compare false.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We want to expand the tree on a mouseclick, when the user
clicks on a leaf we like to expand the tree by reading the
items from the database (the user must think it is already a
subnode based on the apperance). What kind of calls must
we make. The menu item must contain the database key
based on event the items are populated and the menu must
be redrawn.
Any help appreaciated.
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=141897
I'm not sure what exactly you mean by "expansion". If
you're wondering what exactly happens when you try to expand
a submenu it's a call to function MTMSubAction() through the
onclick-event of the item's link. This in turn changes the
item's .expanded property as needed, then it sets the
MTMClickedItem variable so the submenu can be shown as
expanded/closed, and lastly it checks if it needs to call
MTMDisplayMenu() to refresh the menu display.
If you want a specific submenu expanded by default, just set
the second argument of makeLastSubmenu()/makeSubmenu() to
'true', as mentioned in the install guide.
If you set MTMCookieName it'll also store the menu state in
a cookie so it's expanded when the user returns.
Logged In: YES
user_id=124000
Here is an example, OpenTreeMenu.html?item=1-4-4
This should open the treemenu found in the html file and
expand where the item 1-4-4 exists in the tree.
So if my tree consists of the following data
1
1-1
1-1-1
1-1-2
1-1-3
1-2
1-2-1
1-2-2
1-2-3
1-3
1-4
1-4-1
1-4-1-1
1-4-2
1-4-3
1-4-4
then the visiable tree would be
1
1-1
1-2
1-3
1-4
1-4-1
1-4-2
1-4-3
1-4-4
with 1-4-4 highlighted. So I guess what you are telling me
is that by setting the 2nd argument in makeSubmenu(1-4-4,
x) to be true in the onload that this menu will be expanded
to this point?
Thanks for the response!
Logged In: YES
user_id=141897
Yep, that would be correct.
http://www.treemenu.com/install-guide/the-menu.shtml has the
details on the arguments that makeSubmenu() &
makeLastSubmenu() take.
Logged In: YES
user_id=124000
Actually there seemed to be functionality already built in
such that if the text frame url was the same as one of the
items in the toc then the toc would expand to that item.
My problem was that my query parameters were different on
the url between the text frame and the urls in the toc
frame thus making the string compare false.
Logged In: YES
user_id=776841
Hi,
We want to expand the tree on a mouseclick, when the user
clicks on a leaf we like to expand the tree by reading the
items from the database (the user must think it is already a
subnode based on the apperance). What kind of calls must
we make. The menu item must contain the database key
based on event the items are populated and the menu must
be redrawn.
Any help appreaciated.
John