Mar 24, 2009, 1:09 PM
[CLOSED] Change icon on treenode from javascript
Hi
I need to change the icon of a treeview node from javascript, I also want to know how to get the number of childNodes.
I have a tree panel filled with nodes, i just want to loop throu them and thange the icon on some of them.
See sample code
<script type="text/javascript">
function Test()
{
var childItems = tpUsers.root.childNodes;
for (var i=0; i<100; i++) <--How do I get number of childNodes??
{
if (childItems[i] != null)
{
childItems[i].setIcon('UserAdd'); <--WANT TO SET ICON
}
}
}
</script>
/Mikael