hello, I need to use page.insert_html inside a partial that rendered and displayed by using page.insert_html. This is because a form has a inner form that is called dynamically and the inner form again has a form. i.e. an event has many eventdays and an eventdays has many speakers. The part of code in _eventday.rhtml is as follows. <div class = "eventday">. <table> . . . <tr> <td>NEAREST PUBLIC TRANSPORT:<%=eventday_form.text_field("event_day_nearest_public_transport",:index=>nil,:size=>"40")%></td> </tr> </table> <div id = "speakers"><%render :partial=>''speaker/speaker'',:collection=>eventday.speakers%> </div> <b><%=link_to_function "Add a Speaker" do |page1| page1.insert_html :after,:speakers,:partial=>''speaker/speaker'',:object=>Speaker.new end%></b> <%end%> </body> </div> The above partial is called as follows# code in new.rhtml <div id = "eventdays"><%=render :partial=>''eventday/eventday'',:collection=>@event.eventdays%> </div> <b><%=link_to_function "Add an Event Day" do |page| page.insert_html :bottom,:eventdays,:partial=>''eventday/eventday'',:object=>Eventday.new end%></b> I am unable to get the form working but as soon as i remove the page.insert_html in _eventday.rhtml i do not get error but ofcourse the innermost form isnt displayed. Please advise what needs to be done to solve the problem. Thank you. -- 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 -~----------~----~----~----~------~----~------~--~---