One of my colleague was using a treeview. He was not able to get the value of the node selected in a checkbox,the nodes were rendering in a td,say the name of the node is Apple and name of the treeview is tview :-

<td><div style=”width:20px;height:1px”></div></td><td><a id=”tviewn1″ href=”javascript:TreeView_ToggleNode(tview_Data,1,tviewn1,’ ‘,tviewn1Nodes)”><img  alt=”Expand Apple” style=”border-width:0;” /></a></td><td style=”white-space:nowrap;”><input type=”checkbox” name=”tviewn1CheckBox” id=”tviewn1CheckBox” /><span class=”tview_0″ id=”tviewt1″>Apple</span></td>

The javascript to get the node name in this case will be :-

function getSelectedNodeValue()
{
var storeTemp = ”;
var x=document.getElementsByTagName(“td”);
for(var i=0;i
{
var srch=x[i].innerHTML;
if(srch.search(‘CHECKED’)>=0)
{/storeTemp += x[i].innerText + ‘,’; }
}
storeTemp = storeTemp.substring(0,storeTemp.lastIndexOf(‘,’));
}

Refer to http://www.dotnetspider.com/resources/24242-how-get-value-selected-node-treeview.aspx