I would like to build a asp page to display some data in a treeview which can expand on demand without posting everytime. Thats the easy part! The problem is when I need to refresh the page to get more data or view changes in the "titles". If i expand some nodes and then refresh the page then i need to expand them once again to view the changes. Does anyone have a clever script to accomplish this?
Who is Participating?
xabiConnect With a Mentor Commented:
My tree branches have an unique name, so when I open one, I add it to a Variables, in this way:

Opened = "000000@000001"

Each leaf name separated with an "@". When I close one leaf I remove it form the Opened string.
To open the leafs you only need to split the Opened string with

to_open = Opened.split("@")
for (i in to_open) {

Hope it helps
Ok, I have my own, and I use this technique. I have two frames, The left one with the tree view, and the right one with the contens of the selectd tree item. When I expand anything in the left window i pass the value to a right page variable, so I always have a track of the expanded left window nodes. When I reload the left page i ask the right page for the expanded nodes and expand them.
I hope it helps you.
My script is made ussing ASP to retrieve database values, Javascript for the logic and DHTML for hidind showing nodes.
haas090897Author Commented:
I guess thats the way to do it. It feels like I have tried everything else. I think i need to keep track of the nodes they close to, but i have an idea to accomplish this to.
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

points to xabi


If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Comment from expert accepted as asnwer.

E-E Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.