I am using Spry (SpryData.js,xpath.js
)
我正在使用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
那么如何在加载XML数据时显示加载器动画或“加载文本”
(It takes a long time -about 2 sec from a slow CD-. My XML file is big 100KB )
(从慢CD开始需要很长时间 - 大约2秒。我的XML文件大100KB)
3 个解决方案
#1
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)...
我不太擅长Spry,但你不能在div占位符(
#2
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
是。我发现它(奇怪的是,不是来自http://labs.adobe.com/technologies/spry上的Spry的文档)我从这个例子中找到了它 - > http://www.infoaccelerator.net/blog/archives.cfm /日期/ 2006/7
i put this line into the div tag (spry:region) :
我将这一行放入div标签(spry:region):
<p spry:state ="loading"> Loading ( text or an image ) </p>
#3
0
<div align="center" spry:region="dsmain" spry:state="loading" >
<img src="../icon/Loader/1.gif" />
<br />please wait ...
</div>
#1
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)...
我不太擅长Spry,但你不能在div占位符(
#2
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
是。我发现它(奇怪的是,不是来自http://labs.adobe.com/technologies/spry上的Spry的文档)我从这个例子中找到了它 - > http://www.infoaccelerator.net/blog/archives.cfm /日期/ 2006/7
i put this line into the div tag (spry:region) :
我将这一行放入div标签(spry:region):
<p spry:state ="loading"> Loading ( text or an image ) </p>
#3
0
<div align="center" spry:region="dsmain" spry:state="loading" >
<img src="../icon/Loader/1.gif" />
<br />please wait ...
</div>