Hi, I have some calculation to do in some part of my ruby-rails application, I wish to show a "waiting message" whilw rails is calculating the result and when the result is already, I can remove the waiting message and put the final result. I have no idea how I can do this. can some one give me a clue???? Thanks you very much Sayoyo -- 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 -~----------~----~----~----~------~----~------~--~---
Daniel owen Van dommelen
2007-Jan-05 15:44 UTC
Re: how to show waiting msg while rails is doing something e
sayoyo wrote:> Hi, > > I have some calculation to do in some part of my ruby-rails application, > I wish to show a "waiting message" whilw rails is calculating the result > and when the result is already, I can remove the waiting message and put > the final result. I have no idea how I can do this. can some one give me > a clue???? > > Thanks you very much > > SayoyoThis action might be a great candidate to use AJAX for... Check out this simple tutorial on the subject: http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html It should help you out. - Greetz, Danny -- 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 -~----------~----~----~----~------~----~------~--~---
Hi, Thanks you very much for the info. But, we have already tried, but it doesn''t really what we need, since we have to tell the users how many percentage the task has been completed, ajax just allow us the change the html contain once, but not a interval of time.... also, we render to a new /controller/action when the calculation happens. so ajax can''t hardly apply here, Thanks you very much for the information Saiho Daniel Owen van Dommelen wrote:> sayoyo wrote: >> Hi, >> >> I have some calculation to do in some part of my ruby-rails application, >> I wish to show a "waiting message" whilw rails is calculating the result >> and when the result is already, I can remove the waiting message and put >> the final result. I have no idea how I can do this. can some one give me >> a clue???? >> >> Thanks you very much >> >> Sayoyo > > This action might be a great candidate to use AJAX for... Check out > this simple tutorial on the subject: > > http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html > > It should help you out. > > - Greetz, > > Danny-- 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 -~----------~----~----~----~------~----~------~--~---
Daniel Owen van Dommelen
2007-Jan-05 16:00 UTC
Re: how to show waiting msg while rails is doing something e
sayoyo wrote:> Hi, > > Thanks you very much for the info. But, we have already tried, but it > doesn''t really what we need, since we have to tell the users how many > percentage the task has been completed, ajax just allow us the change > the html contain once, but not a interval of time.... also, we render to > a new /controller/action when the calculation happens. so ajax can''t > hardly apply here, > > Thanks you very much for the information > > Saiho >Ajax does have methods for doing your interval thing. Just check the second page of the tutorial it speaks of it a little... Consider this little extract from the tutorial: <label for="searchtext">Live Search:</label> <%= text_field_tag :searchtext %> <%= observe_field(:searchtext, :frequency => 0.25, :update => :search_hits, :url => { :action => :live_search }) %> <p>Search Results:</p> <div id="search_hits"></div> Just check the Internet a little for some info. Since I''m currently actually learning Rails (have to know enough to work in it by monday) I can''t really help you specifically, but Ajax is definately the way to go here, I believe anyway... -- 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 -~----------~----~----~----~------~----~------~--~---
Hi Daniel, Once again thanks you for the informatin, however, "the interval" you have mentionned works on a specific html component(oberver field), I''m really not sure that it will work on a currently running rails processus (I may be wrong), what we are trying to do is gathering information from user, than compute the information, to activate the computation, we use a normal "rails-button" from a form it means, it will send the result on a new /controller/action. but between the old /controller/action and the new one, there will pass a several seconds, 10 -20 sec. but since the "post/get" is already send to server, the browser is waiting.... and we would like to have some "waiting message", just want to keep the user eye busy... Thanks you bery much Saiho Daniel Owen van Dommelen wrote:> sayoyo wrote: >> Hi, >> >> Thanks you very much for the info. But, we have already tried, but it >> doesn''t really what we need, since we have to tell the users how many >> percentage the task has been completed, ajax just allow us the change >> the html contain once, but not a interval of time.... also, we render to >> a new /controller/action when the calculation happens. so ajax can''t >> hardly apply here, >> >> Thanks you very much for the information >> >> Saiho >> > > Ajax does have methods for doing your interval thing. Just check the > second page of the tutorial it speaks of it a little... Consider this > little extract from the tutorial: > > <label for="searchtext">Live Search:</label> > <%= text_field_tag :searchtext %> > <%= observe_field(:searchtext, > :frequency => 0.25, > :update => :search_hits, > :url => { :action => :live_search }) %> > <p>Search Results:</p> > <div id="search_hits"></div> > > Just check the Internet a little for some info. Since I''m currently > actually learning Rails (have to know enough to work in it by monday) I > can''t really help you specifically, but Ajax is definately the way to go > here, I believe anyway...-- 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 -~----------~----~----~----~------~----~------~--~---
Kad Kerforn
2007-Jan-05 16:29 UTC
Re: how to show waiting msg while rails is doing something e
sayoyo wrote:> Hi Daniel, > > Once again thanks you for the informatin, however, "the interval" you > have mentionned works on a specific html component(oberver field), I''m > really not sure that it will work on a currently running rails processus > (I may be wrong), what we are trying to do is gathering information from > user, than compute the information, to activate the computation, we use > a normal "rails-button" from a form it means, it will send the result on > a new /controller/action. but between the old /controller/action and the > new one, there will pass a several seconds, 10 -20 sec. but since the > "post/get" is already send to server, the browser is waiting.... and we > would like to have some "waiting message", just want to keep the user > eye busy... > > Thanks you bery much > > Saihowhy don''t you try backgroundrb ? http://backgroundrb.rubyforge.org/ -- 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 -~----------~----~----~----~------~----~------~--~---
OK, thanks for the information I will have a close look on it!> why don''t you try backgroundrb ? > > http://backgroundrb.rubyforge.org/-- 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 -~----------~----~----~----~------~----~------~--~---
there is a rjs tutorial from oreilly for 6 bucks.. i highly recommend it because it shows how awesome it is to use rjs + ajax. sayoyo wrote:> Hi, > > I have some calculation to do in some part of my ruby-rails application, > I wish to show a "waiting message" whilw rails is calculating the result > and when the result is already, I can remove the waiting message and put > the final result. I have no idea how I can do this. can some one give me > a clue???? > > Thanks you very much > > Sayoyo-- 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 -~----------~----~----~----~------~----~------~--~---
Stephan Wehner
2007-Jan-05 22:34 UTC
Re: how to show waiting msg while rails is doing something e
I think what you are after goes under the title "Progress Bar". Maybe search the web for that. Stephan -- 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 -~----------~----~----~----~------~----~------~--~---