Use a Progess bar, but not for upload?

Hi,

It is possible to use a progess bar, but not only for uploading file???
like long calculation time or database access???

Thanks you very much!!!

sayoyo

If you use Ajax calls, you can specify the :before and :after
parameters to show and hide a spinner/timer graphic.

If you need to actually show the % of work/file completed, you’ll need
to setup a process which has the status available, and call
perdiocally_call_remote to check with the server what the status is
(assuming its taking longer then regular client/server communication).
The returning value would be a percentage/fraction, and you display a
graphic associated with that percentage. If you want to get
sophisticated, you may be able to run threads to split the progress

Hope this helps.
Bart

Hi, thanks you very much for the information,

Do you know where can I find the doc.(how to , examples, etc) about what
you have told me???

Thanks you!!!

sayoyo

Bart Gajderowicz wrote:

If you use Ajax calls, you can specify the :before and :after
parameters to show and hide a spinner/timer graphic.

If you need to actually show the % of work/file completed, you’ll need
to setup a process which has the status available, and call
perdiocally_call_remote to check with the server what the status is
(assuming its taking longer then regular client/server communication).
The returning value would be a percentage/fraction, and you display a
graphic associated with that percentage. If you want to get
sophisticated, you may be able to run threads to split the progress

Hope this helps.
Bart

If you want to execute a long-running process and not have it block
the application, you’ll need to use something like backgroundrb
(http://backgroundrb.rubyforge.org/). Then you can use a
periodically_call_remote ajax callback to grab the status and update
the progress bar.

Mike