[Rails] Unable to page.replace_html from rjs

Chris T
Tue, 08 Aug 2006 23:55:52 -0000

Bryce Berny wrote:
> I am having problems updating a div defined in a partial using both
> Element.update and page.replace_html in an rjs.  I can put a
> link_to_remote in the partial using an :update, and the div updates
> fine.  Does anyone have any idea why this might be happening?
>
> In the partial:
>
> .
> .
> <div
id="question_<%=question.id%>_error">
> .
> (if a link_to_remote is here it works)
> .
>
> In the rjs:
> page.replace_html "question_#{question_id}_error",
"foobar"
>
> Thanks!
>
>
Have you checked with Firebug (you *are* using Firebug?) what is being
returned by the RJS, I assume