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><div> . . <div id="question_<%=question.id%>_error"></div> . (if a link_to_remote is here it works) . In the rjs: page.replace_html "question_#{question_id}_error", "foobar" Thanks! -- Posted via http://www.ruby-forum.com/.
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><div> > . > . > <div id="question_<%=question.id%>_error"></div> > . > (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
Reasonably Related Threads
- RJS replace_html for all divs with a class
- RJS replace_html auto-closing tags
- Re: page.replace_html "#{var_containing_id_name}", :partial
- Re: Re: page.replace_html "#{var_containing_id_name}", :partial
- page.replace_html "#{var_containing_id_name}", :partial => ''edit''