Hello, I am using AJAX to display the contents of a mailbox. Clicking on Older or Newer should be showing the older or newer messages, without refreshing the page. The logic works, but the new information gets displayed along with the old information. Do I need to clear the old output from the screen first? And if I do, how do I do it? Here is a pastie that provides the information about the code: http://pastie.caboo.se/27605 Any help is much appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sounds like you are appending instead of rewriting, which looks to be caused by the :position => ''top'' param sent to :url. Remove that and see what happens. Jason On 12/14/06, Daly <aeldaly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hello, > > I am using AJAX to display the contents of a mailbox. Clicking on Older > or Newer should be showing the older or newer messages, without > refreshing the page. The logic works, but the new information gets > displayed along with the old information. Do I need to clear the old > output from the screen first? And if I do, how do I do it? > > Here is a pastie that provides the information about the code: > http://pastie.caboo.se/27605 > > Any help is much appreciated. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 don''t know how it could have been that simple. I spent HOURS on it yesterday. At one point, I did remove that reference, but I guess something else broke, and after tinkering for such a long time, it made it back. Thank you VERY much for this simple yet very effective solution. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---