:: Forum >>

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:


<img name="imagename" border=0 src="/images/report.gif">

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

// start running gif

var _response = table.response;
table.response = function(xml)
// stop running gif
_response.call(this, xml);


// setup Grid
var obj = new AW.UI.Grid;


Here are the images I used if you'd like a copy:

Sam S.
Monday, January 9, 2006
Are you using FF as your browser? I have not tested your code but I know that IE halts all processing while it is loading data, that includes animated GIFs. I have not tried to load XML, but when doing AJAX or any other type of data loading, IE gives 100% of it's processing power to the loading thread causing everything else to stop. I learned this when I was trying to create a progress bar to show status as large grids where loading (I only use IE for our application). I was never able to come up with anything, I hope yours works well in IE.
Jim Hunter
Monday, January 9, 2006
I'm using IE6 SP2 on WinXP.

I'll put together a demo of this and upload to my website. I'll add the link on here when its available.

Sam S.
Tuesday, January 10, 2006
Here is the demo:


Hope it works for you.
Sam S.
Tuesday, January 10, 2006
I went back and looked at the code I was testing with and I never did try AJAX, I was doing dynamic <script> loading and when doing that it does stop all other processing. It looks like the table.request function might use XMLHttpRequest() and since this is an ActiveX in IE, it might get it's own thread. This is good to know. Thanks for the demo link!
Jim Hunter
Tuesday, January 10, 2006
Thanks for you NICE example and demo. Very helpful.
Is there NOW in b4 a cleaner or nicer way to do this.
G. Cayman
Monday, January 30, 2006
Glad to help, G.

I remember once reading that "status events" or whatnot would be part of B4. But from the sounds of recent posts, B4 deliverables are falling short than originally estimated.

I don't know if status events are actually part of B4 or not... but without any new documentation or examples for B4, your guess is as good as mine.

Sam S.
Monday, January 30, 2006

This topic is archived.

Back to support forum

Forum search