Hi! I am newbie in AJAX, RJS just a beginer in Rails. Anyway, here is my problem : I am bulding an app that will display a list of messages. The last messages appear at the top of the list. For now, it''s static, the list is updated only if the user "refreshes" the web page... My goal is that this list is updated without "refreshing" the whole page, with new messages appearing at the top! I am sure this is easy in rails, but, hey, as I said, I am beginer, so please, guys (and gals!), if you know how to do this, please share with me! Thanks a lot for your help! -- 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 -~----------~----~----~----~------~----~------~--~---
Julien Genestoux wrote:> Hi! > > I am newbie in AJAX, RJS just a beginer in Rails. Anyway, here is my > problem : > I am bulding an app that will display a list of messages. The last > messages appear at the top of the list. For now, it''s static, the list > is updated only if the user "refreshes" the web page... My goal is that > this list is updated without "refreshing" the whole page, with new > messages appearing at the top! > > I am sure this is easy in rails, but, hey, as I said, I am beginer, so > please, guys (and gals!), if you know how to do this, please share with > me! > > Thanks a lot for your help!there is an update option of how often to update, if i remember? :frequency => ''9'' or something like that. anybody else? -- 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 -~----------~----~----~----~------~----~------~--~---
gemblon (t.b.) wrote:> Julien Genestoux wrote: >> Hi! >> >> I am newbie in AJAX, RJS just a beginer in Rails. Anyway, here is my >> problem : >> I am bulding an app that will display a list of messages. The last >> messages appear at the top of the list. For now, it''s static, the list >> is updated only if the user "refreshes" the web page... My goal is that >> this list is updated without "refreshing" the whole page, with new >> messages appearing at the top! >> >> I am sure this is easy in rails, but, hey, as I said, I am beginer, so >> please, guys (and gals!), if you know how to do this, please share with >> me! >> >> Thanks a lot for your help! > > there is an update option of how often to update, if i remember? > :frequency => ''9'' or something like that. > > anybody else?Hi, ur problem has solved or not? Srinivas Avasarala -- 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 -~----------~----~----~----~------~----~------~--~---
Sorry guys, I really don''t get what you''re telling me... Where should I put ":frequency => ''9''"? Thanks for your help, anyway! Srinivas Avasarala wrote:> gemblon (t.b.) wrote: >> Julien Genestoux wrote: >>> Hi! >>> >>> I am newbie in AJAX, RJS just a beginer in Rails. Anyway, here is my >>> problem : >>> I am bulding an app that will display a list of messages. The last >>> messages appear at the top of the list. For now, it''s static, the list >>> is updated only if the user "refreshes" the web page... My goal is that >>> this list is updated without "refreshing" the whole page, with new >>> messages appearing at the top! >>> >>> I am sure this is easy in rails, but, hey, as I said, I am beginer, so >>> please, guys (and gals!), if you know how to do this, please share with >>> me! >>> >>> Thanks a lot for your help! >> >> there is an update option of how often to update, if i remember? >> :frequency => ''9'' or something like that. >> >> anybody else? > > Hi, > ur problem has solved or not? > > Srinivas Avasarala-- 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 -~----------~----~----~----~------~----~------~--~---
Julien Genestoux wrote:> Sorry guys, I really don''t get what you''re telling me... Where should I > put ":frequency => ''9''"? > > Thanks for your help, anyway! > > > Srinivas Avasarala wrote: >> gemblon (t.b.) wrote: >>> Julien Genestoux wrote: >>>> Hi! >>>> >>>> I am newbie in AJAX, RJS just a beginer in Rails. Anyway, here is my >>>> problem : >>>> I am bulding an app that will display a list of messages. The last >>>> messages appear at the top of the list. For now, it''s static, the list >>>> is updated only if the user "refreshes" the web page... My goal is that >>>> this list is updated without "refreshing" the whole page, with new >>>> messages appearing at the top! >>>> >>>> I am sure this is easy in rails, but, hey, as I said, I am beginer, so >>>> please, guys (and gals!), if you know how to do this, please share with >>>> me! >>>> >>>> Thanks a lot for your help! >>> >>> there is an update option of how often to update, if i remember? >>> :frequency => ''9'' or something like that. >>> >>> anybody else? >> >> Hi, >> ur problem has solved or not? >> >> Srinivas Avasarala--> what is ur requirement? what i understood is, when go to list page, u should get all the messages, automatically, without refreshing.. is this correct?.. -- 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 -~----------~----~----~----~------~----~------~--~---
> --> > what is ur requirement? > what i understood is, when go to list page, > u should get all the messages, automatically, without refreshing.. > is this correct?..Exactly... and one a new message arrives, the list of messages should update with the new message at the top! -- 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 -~----------~----~----~----~------~----~------~--~---
Srinivas Avasarala wrote:> Julien Genestoux wrote: >> Sorry guys, I really don''t get what you''re telling me... Where should I >> put ":frequency => ''9''"? >> >> Thanks for your help, anyway! >> >> >> Srinivas Avasarala wrote: >>> gemblon (t.b.) wrote: >>>> Julien Genestoux wrote: >>>>> Hi! >>>>> >>>>> I am newbie in AJAX, RJS just a beginer in Rails. Anyway, here is my >>>>> problem : >>>>> I am bulding an app that will display a list of messages. The last >>>>> messages appear at the top of the list. For now, it''s static, the list >>>>> is updated only if the user "refreshes" the web page... My goal is that >>>>> this list is updated without "refreshing" the whole page, with new >>>>> messages appearing at the top! >>>>> >>>>> I am sure this is easy in rails, but, hey, as I said, I am beginer, so >>>>> please, guys (and gals!), if you know how to do this, please share with >>>>> me! >>>>> >>>>> Thanks a lot for your help! >>>> >>>> there is an update option of how often to update, if i remember? >>>> :frequency => ''9'' or something like that. >>>> >>>> anybody else? >>> >>> Hi, >>> ur problem has solved or not? >>> >>> Srinivas Avasarala > > --> > what is ur requirement? > what i understood is, when go to list page, > u should get all the messages, automatically, without refreshing.. > is this correct?..--> what is ur requirement? what i understood is, when go to list page, u should get all the messages, automatically, without refreshing.. is this correct?.. Srinivas Avasarala. -- 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 -~----------~----~----~----~------~----~------~--~---
Exactly... and one a new message arrives, the list of messages should update with the new message at the top! -- 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 -~----------~----~----~----~------~----~------~--~---
Srinivas Avasarala wrote:> Julien Genestoux wrote: >> Sorry guys, I really don''t get what you''re telling me... Where should I >> put ":frequency => ''9''"?it is a different call. you can do a remote periodic update or (observer?) here is a page that should help you, with an example: http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html -- 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 -~----------~----~----~----~------~----~------~--~---
Julien Genestoux wrote:> Exactly... and one a new message arrives, the list of messages should > update with the new message at the top!Hi, change ur form tag in rhtml file as below <%= form_remote_tag( :update => "table", :url => {:controller => ''name of ur controller'', :action => :search}) %> <%= submit_tag ''Search''%> ----> submit button <%= end_form_tag %> --->closing tag action --> ur required action. in which page u want to show the output, so in that page, copy the below code.. <div id = "table"> </div> this will work, only when u press the submit button other option --> <%= link_to_remote("list", :update => ''table'', :url =>{ :controller=>''name of controller'',:action => :search, :id => give ur id })%> in which page u want to show the output, so in that page, copy the below code.. <div id = "table"> </div> --> this will work, only after click on this link.. Srinivas Avasarala. -- 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 -~----------~----~----~----~------~----~------~--~---