Rank: Member Groups: Member
Joined: 6/14/2007 Posts: 9
|
I try to get the level of a selected node in a treeview using (client-side) javascript:
function ChangeSection(section) { if (section== 2) { var link = document.getElementById("tvPaysProvVille"); var node = link.selectedNodes; var selNodeLevel = node.level; if (selNodeLevel == 0) { document.form1.elements["hfTreeViewObject"].value="le pays"; alert(document.form1.elements["hfTreeViewObject"].value); } else ... return; } }
but the system reports: node, as having an undefinite value and does not recognize: selNodeLevel as a valid object; What code should be used to get the desired result?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi, Please check our client side JavaScript API reference at here: http://www.essentialobjects.com/ViewDoc.aspx?t=clientapi_howto.htmlWhatever you use you have to see them there first. "selectedNode" and "level" are server side properties. Those and the client side interface are not the same thing. Thanks
|