The TreeView creates an object in Javascript on the client side that's called
[treeview name]_Data
i.e., if the treeview is named tvNavigation, the object's name would be
tvNavigation_Data
This object has a property called selectedNodeID. This property has a ...
property called value that contains the id of the currently selected node. So
var name = tvNavigation_Data.selectedNodeID.value;
var selectedNode =
Document.all?Document.all[name]:Document.getElementById(name);
will get a reference to the currently selected node.
"Wes" wrote:
Hi there,
Does anyone know how to get the selected node from a ASP.Net 2.0 TreeView in
Javascript? I used to be able to get it in the old webcontrols one, but now
the properties have changed and I can't seem to figure it out.
Thanks,
Wes