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
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).


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.