Link_to_remote inserting instead of replacing

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

On 5 May 2008, at 23:59, Emil K. 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

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 C.
[email protected]
wrote:

inserts it in the top of the div. Why is this? Should the target

Posted via http://www.ruby-forum.com/.


James M.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs