Now I use the ultrawebtree with checkboxes in my code.I want to make the all child nodes checked when parent node is checked with Javascript. Ultrawebtree'samples show me some case.But the case are server side event,now I want to get the some client side event's case.So I want to get some case with Javascript,thanks!
Hey tianshuo,You can mess around with the following code snippets to come up with a solution for your request.If none of these help, please post your code and I will gladly help you as best I can.to get an instance of the Tree you can do this in BLOCKED SCRIPTvar tree = igtree_getTreeById("TREENAME"); just replace "TREENAME" with the actual ID of your UltraWebTree.you'll also need the node that is selected.var node = tree.getSelectedNode();
you'll want to check to see if this parent node has any child nodes...
var childNodes = node.getChildNodes();
if (node == null || childNodes .length == 0) { return;}
if it does have child nodes then you'll want to loop through the child nodes andcheck the checkboxes.for (i = 0; i < childNodes.length; i++) { // Place checkbox code in here //}
I hope this helps!-Tim