Spry XMLDataset 加载数据时显示加载器
我正在使用 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>
那么如何在加载 XML 数据时显示加载器动画或“正在加载文本”
(需要很长时间 - 关于慢速 CD 需要 2 秒-我的 XML 文件很大 100KB)
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 )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不太擅长 Spry,但是你不能在 div 占位符中添加一个 css 背景吗(
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)...
是的。 我找到了它(奇怪的是,不是来自 http://labs.adobe.com/technologies 上的 Spry 文档/spry)
我从这个例子中找到了它-> http://www.infoaccelerator.net/blog/archives.cfm/ date/2006/7
我将此行放入 div 标签 (spry:region) 中:
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) :