[Seaside] jQuery busy.gif

Lukas Renggli renggli at gmail.com
Tue Sep 1 22:09:41 UTC 2009


> But so far I've only used jQuery and not Prototype or Scriptaculous in
> my project and don't know if it is reasonable to add them just to get
> a busy indicator.

I wouldn't mix them if you don't have strong (legacy) reasons to do so.

>  Is there a way to display a busy indicator and then have it exit when
> a full page refresh is complete using just jQuery?

Sure, do it the same as described in this mail, but instead use

     (html jQuery: #spinner) show

to fade in the spinner. Similarly you can setup to show the spinner
globally for all AJAX actions by adding the following expression to
the bottom of your page:

    html script: (html jQuery ajaxSetup
        onBeforeSend: (html jQuery: #spinner) show;
        onComplete: (html jQuery: #spinner) hide)

Search Google and the jQuery documentation for more samples.

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list