Improved version of the onComplete could be:
if(Ajax.activeRequestCount < 1) Element.hide(loading);
In the case of having multiple requests running at the same time
hth
sigi
On 4/7/06,
Marco M. Jaeger <[EMAIL PROTECTED]> wrote:
Thanks for replying - so you were using Ajax.Responders instead of the
Ajax.Updater, right?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Maninder,
Singh
Sent: Friday, April 07, 2006 11:23 AM
To: [EMAIL PROTECTED]; rails-spinoffs@lists.rubyonrails.org
Subject: RE: [Rails-spinoffs] ajax loading message
I faced the same issue, but was never able to resolve it using this.
Maybe it was because I was testing using localhost and the responses were
too fast..but dunno!
Then I tried doing it using the following -
Ajax.Responders.register({
onCreate: function(request) {
Element.show(loading);
},
onComplete: function(request) {
Element.hide(loading);
}
});
This was my global spinner image. This always worked fine.
Maybe you would want to give it a shot.
Thank you,
Mandy.
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
--
Mit freundlichen Grüßen
Siegfried Puchbauer
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs