Reputation: 179
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 )
Upvotes: 0
Views: 1688
Reputation: 11
<div align="center" spry:region="dsmain" spry:state="loading" >
<img src="../icon/Loader/1.gif" />
<br />please wait ...
</div>
Upvotes: 0
Reputation: 179
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>
Upvotes: 0
Reputation: 11977
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)...
Upvotes: 1