Status bar - while controller action is time intensive

Hi,

I have a time consuming action in a controller. So when a user clicks on this link to this time consuming action, I would like give users a status bar, saying something like "LOADING....". How do i do that?

1. I have used remote_function stuff to show hidden status-indicator in other parts of the application.

   But here its an entire new page that gets loaded and just showing a hidden progress bar in the current page would'nt help

Whats the best given my case?

Regards, Sandeep G

In the layout file on body tag use onload and unload functions to show the status bar.

Thanks Kishore. But isn't body onload and unload functions called before rendering and after rendering?

Or is it before starting the controller action and after controller action? If so, wouldn't this clash with window.load , window.unload functions in JS.

I already have window.load , window.unload functions in my JS. Would this clash?

Regards, Sandeep G

Bala kishore Pulicherla wrote:

Thanks Kishore. But isn't body onload and unload functions called before rendering and after rendering?

Those won't help. The page is only sent to the browser when rails has completely finished with it (ie after all of your time consuming controller code has run)

Fred