views:

67

answers:

1

i use such treeview http://docs.jquery.com/Plugins/Treeview/treeview, it saves perfect opened nodes when i click to subnodes links, but if i click on link, that is not in treeview the treeview is closes. for example- in treeview i have product categories, when click on category it loads list of products, but if i click on product details (this link not in treeview) then treeview is close. any ideas?

A: 

I can take a guess here that the links inside the tree view are already there on page load and when clicked simply "show" their own subtree (not a separate page), where as the links throughout the rest of page act as normal links (href="/somefile.html") and so reconstruct the new page, meaning the treeview menu included.

I would either:

  1. use ajax to get the content needed from outside links (I think ajaxify does this pretty well).
  2. use querystrings and server side scripting to construct the tree view in a retained state.
  3. use an iframe for the content area so only it reloads when a link is clicked.

If I am wrong about my assumptions above please provide some code so I can get a clue. Best wishes.

Gabriel