Get selectednode value
<p>I have a tree view. I want the name of the selected node to be alerted.
But my code keeps giving me the same name of the node selected for the first time despite of other node selections.</p>

<p>so for example, if I selected Node "A" when I launched the application it will alert "A".
But if choose something else after that (a different node), it will still alert me with "A".</p>

<p>Here is the code so far:</p>

<pre><code> function childnode(event) {
     var treeViewData = window["&lt;%=nav_tree_items.ClientID%&gt;" + "_Data"];
     var selectedNode = document.getElementById(treeViewData.selectedNodeID.value);

     alert(selectedNode.nodeName.toString());             

     return false;
 }
</code></pre>

<p>The treeview is generated from a database.</p>
