Welcome Guest Search | Active Topics | Sign In | Register

Client side javascript attempt to get the level of a selected node of a treeview Options
Webideal
Posted: Wednesday, July 30, 2008 7:03:28 AM
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?
eo_support
Posted: Wednesday, July 30, 2008 7:53:42 AM
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.html

Whatever 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




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.