Hide the tree when I update items

Hi all,

How i can hide the tree’s

when I update a branch ? I create a loading branch on-demand.
I want to create a loading
and it will hide the tree’s
when the tree is loading items.

Maybe I must get the professional edition ?

Thanks :slight_smile:


you may try to show the transparent container over the tree container when the branch is loaded:



You should set onXLS and onXLE to hide show the cover:

tree.attachEvent("onXLS",function(){ document.getElementById('cover').style.display='block'; }); tree.attachEvent("onXLE",function(){ document.getElementById('cover').style.display='none'; });

thanks for the answer, but my pb is when the user click on the item, I overide the event “Onclick”, I use the method “tree.insertNewChild”.

I don’t load XML, then I think you code won’t work. I use only Javascript.

Have you another idea ? Thanks :slight_smile:

If you don’t use asynchronous loading, you don’t need any event handlers. Just call functions those hide or show container when you need.

I use asynchronous loading, because I load the branch on-demand. I try to use the event onBeforeCheck because when you check, it’s create a complete branch.

[code]tree.attachEvent(“onBeforeCheck”, function(id,state){return DisplayWait(state);});

function DisplayWait(state){
if (state != 1)

return true;


function onCheckBranch(id,state)
if (state != 0)

but I can’t hide the Tree div, it doesn’t work.

For information, I use an Event when I load tree at first. It works fine, then I don’t understand why I can’t use the same way for the loading on-demand.

[code]tree.attachEvent(“onXLE”, function(tree,id){displayafterloading();});

function displayafterloading(){



As far as I understand the onXLE event isn’t called after xml loading. Am I right?

Do you loadXML method to load data or dynamic loading (setXMLAutoLoading method) ? If you do, event must occur.

I don’t use setXMLAutoLoading method to create a dynamic branch. I use the event “onclick”.

Sorry, I don’t understand what the issue is. Possibly it would be clearer if you provided a complete demo and describe it in detail.