I want to create a news ticker. I pull the top five articles from the database in my controller and pass it on to my view. I have a ticker bar, and I want to cycle through each article continuously. I previously did this with custom javascript from an RSS feed. Any ideas? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
It''s expensive, but periodically_call_remote will issue an Ajax call to your server at a specified interval and you can then update a div containing your news blip. On Jun 29, 2007, at 1:29 PM, partydrone wrote:> > I want to create a news ticker. I pull the top five articles from the > database in my controller and pass it on to my view. I have a ticker > bar, and I want to cycle through each article continuously. I > previously did this with custom javascript from an RSS feed. > > Any ideas? > > Thanks. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m familiar with the commands, it''s implementing them that''s causing me headaches. When I try using <%= periodically_call_remote(:update => ''ticker_headline'', :frequency => 3, :url => { :partial => ''article'', :collection => @articles }) %> in or outside of my tag, it loads the entire home page over again and puts it inside. NOT the article title I want... What about passing the @articles collection to cycle? Anyway to use that with JavaScript to accomplish the same thing without the expense of periodically_call_remote? On Jun 29, 2:34 pm, "s.ross" <cwdi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It''s expensive, but periodically_call_remote will issue an Ajax call > to your server at a specified interval and you can then update a div > containing your news blip. > > On Jun 29, 2007, at 1:29 PM, partydrone wrote: > > > > > I want to create a news ticker. I pull the top five articles from the > > database in my controller and pass it on to my view. I have a ticker > > bar, and I want to cycle through each article continuously. I > > previously did this with custom javascript from an RSS feed. > > > Any ideas? > > > Thanks.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Are you rendering with :layout => false in your callback function? On Jun 29, 2007, at 1:59 PM, partydrone wrote:> > I''m familiar with the commands, it''s implementing them that''s causing > me headaches. When I try using > > <%= periodically_call_remote(:update => ''ticker_headline'', :frequency > => 3, :url => { :partial => ''article'', :collection => @articles }) %> > > in or outside of my tag, it loads the entire home page over again and > puts it inside. NOT the article title I want... > > What about passing the @articles collection to cycle? Anyway to use > that with JavaScript to accomplish the same thing without the expense > of periodically_call_remote? > > On Jun 29, 2:34 pm, "s.ross" <cwdi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> It''s expensive, but periodically_call_remote will issue an Ajax call >> to your server at a specified interval and you can then update a div >> containing your news blip. >> >> On Jun 29, 2007, at 1:29 PM, partydrone wrote: >> >> >> >>> I want to create a news ticker. I pull the top five articles from >>> the >>> database in my controller and pass it on to my view. I have a ticker >>> bar, and I want to cycle through each article continuously. I >>> previously did this with custom javascript from an RSS feed. >> >>> Any ideas? >> >>> Thanks. > > > >Steve Ross sross-ju+vs0qJmyeQKKlA4PA9hA@public.gmane.org http://www.calicowebdev.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 about using custom JavaScript and passing the articles (@articles) to that JavaScript from the controller? On Jun 29, 2:29 pm, partydrone <partydr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I want to create a newsticker. I pull the top five articles from the > database in my controller and pass it on to my view. I have aticker > bar, and I want to cycle through each article continuously. I > previously did this with custom javascript from an RSS feed. > > Any ideas? > > Thanks.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---