Sandeep Gudibanda
2008-Apr-15 05:15 UTC
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
bala kishore pulicherla
2008-Apr-15 05:23 UTC
Re: Status bar - while controller action is time intensive
In the layout file on body tag use onload and unload functions to show the status bar. <body onunload="function_javascript_hide_statusbar();" onload=function_javascript_show_statusbar;> On Tue, Apr 15, 2008 at 10:45 AM, Sandeep Gudibanda < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > 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 > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sandeep Gudibanda
2008-Apr-15 06:03 UTC
Re: Status bar - while controller action is time intensive
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:> In the layout file on body tag use onload and unload functions to show > the > status bar. > > <body onunload="function_javascript_hide_statusbar();" > onload=function_javascript_show_statusbar;> > > On Tue, Apr 15, 2008 at 10:45 AM, Sandeep Gudibanda <-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Apr-15 06:57 UTC
Re: Status bar - while controller action is time intensive
On Apr 15, 7:03 am, Sandeep Gudibanda <rails-mailing-l...@andreas- s.net> 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> 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: > > In the layout file on body tag use onload and unload functions to show > > the > > status bar. > > > <body onunload="function_javascript_hide_statusbar();" > > onload=function_javascript_show_statusbar;> > > > On Tue, Apr 15, 2008 at 10:45 AM, Sandeep Gudibanda < > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---