0

I am using Spry (SpryData.js,xpath.js)

    var ds1 = new Spry.Data.XMLDataSet("_db/db.xml", "bildiriler/bildiri",{useCache:false});
 // load the xml tree

....

<!-- use it in a loop - 
 Sometimes the page use "ds1.loadData();" to refresh the data -->
 <div spry:region="ds1" spry:repeatchildren="ds1">
 <a href="#">{author}</a></div>

So how can I show a loader animation or "Loading text" while XML data is loading

(It takes a long time -about 2 sec from a slow CD-. My XML file is big 100KB )

Errico Malatesta
  • 179
  • 1
  • 13

3 Answers3

1

I am not quite good at Spry, but can't you add a css background to the div placeholder (<div spry:region="ds1" ...) which will be shown at all time (and probably can be replaced through an observer that sets the background-image of the placeholder when the rows are loaded)...

Alex Gyoshev
  • 11,929
  • 4
  • 44
  • 74
0

Yes. I found it (strangely, not from the docs of Spry on http://labs.adobe.com/technologies/spry) I found it from this example -> http://www.infoaccelerator.net/blog/archives.cfm/date/2006/7

i put this line into the div tag (spry:region) :

<p spry:state ="loading"> Loading ( text or an image ) </p>
Errico Malatesta
  • 179
  • 1
  • 13
0
<div align="center" spry:region="dsmain" spry:state="loading" >
<img src="../icon/Loader/1.gif" />
<br />please wait ...
</div>   
loali
  • 11
  • 2