# Render partial in div

**URL:** <https://www.ruby-forum.com/t/render-partial-in-div/127860>\
**Category:** Rails\
**Created:** [February 1, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/render-partial-in-div/127860 "2008-02-01T21:59:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [February 1, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/render-partial-in-div/127860/1 "2008-02-01T21:59:21Z")

</div>

I have this link which when clicked will loop and render more links and  
a form from a partial inside of “myDiv”:

\<%= link\_to\_remote ‘MyLink’ . . . ., :update =\>“myDiv” %\>

What I am trying to do is have a form\_remote\_tag that re-renders the  
list of stuff in “myDiv” when something is added but it doesn work.

form\_remote\_tag :url =\> { :action =\>. . .}, update =\> ‘myDiv’

Does it not work because it is inside the div that it is trying to  
render or is there another reason that it totally eluding me? Thanks,

-S

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [February 2, 2008, 12:23am UTC](https://www.ruby-forum.com/t/render-partial-in-div/127860/2 "2008-02-02T00:23:25Z")

</div>

On 2/1/08, Shandy N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What I am trying to do is have a form\_remote\_tag that re-renders the  
> list of stuff in “myDiv” when something is added but it doesn work.
> 
> form\_remote\_tag :url =\> { :action =\>. . .}, update =\> ‘myDiv’
> 
> Does it not work because it is inside the div that it is trying to  
> render or is there another reason that it totally eluding me? Thanks,

I would drop the :update and use an rjs template with a  
page.replace\_html call instead.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
