Board Logo

Is it possible to get the captions of the children of a given item ?
rkannan - 8/9/2005 at 08:24 PM

Hi,

I would like to get the captions of the children of the selected item ? Is there any builtin Javscript function to achieve that ? I would be happier if I could get the captions of only the leaf items for the selected item.

Thanks in advance for any help provided.


rock - 9/6/2005 at 11:11 AM

Once you get tree_item object (say it's o_item var) you could:
// get access to its children
for(var i=0; i<o_item.a_children.length; i++) {
o_child = o_item.a_children;//get child tree_item object
alert(o_child.a_config[0]);// get caption of the child
...
if(o_child.a_children.length) {
//child is a node
} else {
//child is a leaf
}
}


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/