R
rao
I am trying to get sub nodes for for clicked node using getChildren()
method as shown below. I am getting javascript exception error
(subtree.null )when nodes are not expanded. The code works only when
nodes are expanded.
any help is greatly appreciated. I am getting this error while
accessing the
property currentChild.getAttribute("Text").
Thanks
rao
Thanks
rao
<SCRIPT language="jscript">
// Walk through the tree.
function walkChildren(arrayChildren){
var currentChild;
for (var i = 0; i < arrayChildren.length; i++){
currentChild = arrayChildren;
childrenDIV.innerText += "[" +
currentChild.getAttribute("Text") + "]";
walkChildren(currentChild.getChildren());
}
}
</SCRIPT>
method as shown below. I am getting javascript exception error
(subtree.null )when nodes are not expanded. The code works only when
nodes are expanded.
any help is greatly appreciated. I am getting this error while
accessing the
property currentChild.getAttribute("Text").
Thanks
rao
Thanks
rao
<SCRIPT language="jscript">
// Walk through the tree.
function walkChildren(arrayChildren){
var currentChild;
for (var i = 0; i < arrayChildren.length; i++){
currentChild = arrayChildren;
childrenDIV.innerText += "[" +
currentChild.getAttribute("Text") + "]";
walkChildren(currentChild.getChildren());
}
}
</SCRIPT>