Hi all,
How i can hide the tree’s
I want to create a loading
Maybe I must get the professional edition ?
Thanks
Hi all,
How i can hide the tree’s
Maybe I must get the professional edition ?
Thanks
Hi,
you may try to show the transparent container over the tree container when the branch is loaded:
[code]
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
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)
{
document.getElementById(‘imgload’).style.display=‘block’;
document.getElementById(‘imgload’).style.visibility=‘visible’;
document.getElementById('treebox').style.display='none';
document.getElementById('treebox').style.visibility='hidden';
}
return true;
}
function onCheckBranch(id,state)
{
if (state != 0)
{
upDateBranch(id);
displayafterloading();
}
}
[/code]
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(){
document.getElementById(‘imgload’).style.display=‘none’;
document.getElementById(‘imgload’).style.visibility=‘hidden’;
document.getElementById(‘treebox’).style.display=‘block’;
document.getElementById(‘treebox’).style.visibility=‘visible’;
}[/code]
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.