It appears to be just hanging on to the first one it saved. I brought up the page with the Tree View on it, and viewed the source.
) is that the code you've written duplicates work that's already doen by the Tree View Java Script library. ) that stores the currently-selected node, and a function [Tree View_Select Node(data, node, node Id)] that does the style-swapping and recording of the selected node. I'm hesitant to create a parallel node selection function to address such a (seemingly) small requirement.
I'd much rather learn how to properly use the Tree View Java Script API, if anybody on this forum knows how it works.
), where the Tree View server-side control presumably looks to establish control state during Post Back.