Hi guys. Is there anyone, that have a good explanation for this: I have a link_to_remote function that has the :update tag pointing to the "pages_content" div, but instead of replacing the content it simply inserts it in the top of the div. Why is this? Should the target content not be totally replaced? - Emil -- 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 -~----------~----~----~----~------~----~------~--~---
On 5 May 2008, at 23:59, Emil Kampp wrote:> > Hi guys. > > Is there anyone, that have a good explanation for this: I have a > link_to_remote function that has the :update tag pointing to the > "pages_content" div, but instead of replacing the content it simply > inserts it in the top of the div. Why is this? Should the target > content > not be totally replaced? >Link to remote knows how to do both, so there''s a small chance you accidentally asked it to do that. A more likely possibility is that your html is invalid (which puts you at the mercy of how the browser chooses to interpret it). Fred> - Emil > -- > 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 -~----------~----~----~----~------~----~------~--~---
I agree. And a good tool to verify this is with the Firebug plugin for firefox. You can use a console against the currently loaded page (dom) and see if getElementById returns you an array or a single element. On Tue, May 6, 2008 at 4:22 AM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 5 May 2008, at 23:59, Emil Kampp wrote: > > > > > Hi guys. > > > > Is there anyone, that have a good explanation for this: I have a > > link_to_remote function that has the :update tag pointing to the > > "pages_content" div, but instead of replacing the content it simply > > inserts it in the top of the div. Why is this? Should the target > > content > > not be totally replaced? > > > Link to remote knows how to do both, so there''s a small chance you > accidentally asked it to do that. A more likely possibility is that > your html is invalid (which puts you at the mercy of how the browser > chooses to interpret it). > > Fred > > - Emil > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > >-- James Mitchell --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---