# Refresh a list

**URL:** <https://www.ruby-forum.com/t/refresh-a-list/108464>\
**Category:** Rails\
**Created:** [July 3, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/refresh-a-list/108464 "2007-07-03T20:54:52Z")\
**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:** [July 3, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/refresh-a-list/108464/1 "2007-07-03T20:54:52Z")

</div>

I now have things being deleted dynamically from a list. The problem now  
is that when I add something to that list it hits the database getting  
all the correct users and the things associated with those users.  
However, some of the items are duplicated because the list is not being  
cleared when something is added and the new list generated. Is there a  
way to clear everything that is in a div with an id so I can re-populate  
that div with new information?

---

<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:** [July 5, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/refresh-a-list/108464/2 "2007-07-05T16:31:30Z")

</div>

I figured it out. In the remote\_form\_tag that I was using I had the  
option for :position =\>‘bottom’. I left that out and the form and  
everything displayed correctly without any duplicated information.
