Home - Forums-.NET - FlyTreeView (ASP.NET) - Client JavaScript for ASP.NET 1.1

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Client JavaScript for ASP.NET 1.1
Link Posted: 01-Nov-2006 06:21
What is the best way to get Node or SelectedNode from JavaScript without using ContextMenu?

Given that TreeView is populated and a node is selected, I want to use client-side button to invoke a javascript function and access TreeView and/or Node from the JavaScript.

Simple example would be appreciated.  Thank you.
Link Posted: 01-Nov-2006 08:03
do you need selected node?

Then simply
document.getElementById('yourTreeView').SelectedNode  
Link Posted: 01-Nov-2006 10:04
Thank you for the example.

What about getting to the ParentNode from SelectedNode?
Link Posted: 01-Nov-2006 10:19
Solved:

document.getElementById('yourTreeView').SelectedNode.ParentNode;