Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by lluis faja on Nov 12, 2009 03:54
open dhtmlx forum
dhtmlxtree throbber meanwhile XML is loading

Hi,

it's possible to display an throbber image in <div></div> meanwhile XML is loading

if <div> section contains an image, it's not replaced when XML ends loading !!!! it's added

thanks in advance
Answer posted by Alex (support) on Nov 12, 2009 05:32

Hello,

please, check that xml is correct - try to open it in browser. 

Probably you have placed html element incorrectly. 

The correct ways are:

<item text="&lt;div&gt;Item text here&lt;/div&gt;" ...></item>

the following approach can be used only with the PRO edition

<item id=".." ...><itemtext><![CDATA[<div>Item text here</div]]></itemtext></item>

Answer posted by lluis.faja on Nov 13, 2009 00:57
Hi again !

My problem isn't in the XML file. It's on HTML page
I paste my main code:

<div id='tree2Box' style=' width:200; height:500; overflow:auto;'><img src='throbber-slow.gif'></div>
<link rel='STYLESHEET' type='text/css' href='dhtmlxtree.css'>
    <script type='text/javascript'> 
        tree2 = new dhtmlXTreeObject('tree2Box', '100%', '100%', 2);
        tree2.loadXML('/egroupware/index.php?menuaction=trhome.asyncTodosTree.xml');
        tree2.setImagePath('/egroupware/trhome/templates/default/images/dhtmlxtree/');
        tree2.setOnClickHandler('onNodeSelect2');
        tree2.enableTreeLines(false);
    </script>


When XML finished to load, the throbber picture doesn't disappear.
The "tree2Box" element still contains throbber, in addition to XML parsed file. I attach an image

Thanks again, Lluís
Attachments (1)
throbber.png16.14 Kb
Answer posted by Alex (support) on Nov 13, 2009 01:51

Hello,

>> When XML finished to load, the throbber picture doesn't disappear.

tree doesn't remove elements itself. So, you should use own approach to hide or remove unnecessary elements on your page.