By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,965 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,965 IT Pros & Developers. It's quick & easy.

i.e Treeview getChildren method working only when nodes are expanded

P: n/a
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[i];
childrenDIV.innerText += "[" +
currentChild.getAttribute("Text") + "]";
walkChildren(currentChild.getChildren());
}
}
</SCRIPT>
Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.