Example: Animated Gif while Large XML Grid loads
Hello, all.
I needed to have some sort of status message or animated gif while my XML Grid loaded - since I load about 3,000 rows. According to the forum, status messages won't be available until Beta 4.
As a work around in the mean time, I combined a few postings on this forum and came up with the following solution:
Here are the images I used if you'd like a copy:
http://www.c-labtech.com/images/run_report.gif
http://www.c-labtech.com/images/report.gif
I needed to have some sort of status message or animated gif while my XML Grid loaded - since I load about 3,000 rows. According to the forum, status messages won't be available until Beta 4.
As a work around in the mean time, I combined a few postings on this forum and came up with the following solution:
<body>
<img name="imagename" border=0 src="/images/report.gif">
<script>
var runImg = new Image();
var stillImg = new Image();
runImg.src = "/images/run_report.gif";
stillImg.src = "/images/report.gif";
var table = new AW.XML.Table;
// table setup
var str = new AW.Formats.String;
var num = new AW.Formats.Number;
table.setFormats([str, num, str, str, num]);
// get XML data
table.setURL("/myfolder/big_ass_file.xml");
// start running gif
document.imagename.src=runImg.src;
var _response = table.response;
table.response = function(xml)
{
// stop running gif
document.imagename.src=stillImg.src;
_response.call(this, xml);
}
table.request();
// setup Grid
var obj = new AW.UI.Grid;
...
document.write(obj);
</script>
</body>
Here are the images I used if you'd like a copy:
http://www.c-labtech.com/images/run_report.gif
http://www.c-labtech.com/images/report.gif
Sam S.
January 9,