how to remove all content from a div with rjs?

hey all,
every time the user click on a thumbnail, it gets display into a div like this:

page.insert_html :bottom, mydiv
image_tag("/img/bigimages/#{@filename}", :alt=>‘BacoTP’)

it works great. What I would like to do is remove all picture from the div every time the user clicks on another thumbnail.

something like:

page.flush_all_content mydiv
page.insert_html :bottom, mydiv, image_tag("/img/bigimages/#{@filename}", :alt=>‘BacoTP’)

any idea how to do this?

thanx in advance

Pat

page.replace_html should do it instead of page.insert_html

yep, just figured it out thanx :slight_smile: