Forum: Ruby on Rails Very simple RJS not working in IE

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dylan M. (Guest)
on 2006-05-03 21:00
(Received via mailing list)
My HTML:

<div id="search_div" style="display: none;">
<table>
<tbody id='search_results'>
</tbody>
</table>
</div>

My RJS:

page.insert_html :bottom, 'search_results', "<tr><td>Test</td></tr>"
page.show "search_div"

Now, everytime this gets called, it adds a "Test" row. However, I
want it to replace the current rows, not add one.

So I tried adding this line to my RJS before the other 2 lines:

page.replace_html 'search_results', ''

This clears out the TBODY perfectly fine in both Firefox and Safari,
but it stops the RJS from processing in IE.

I know IE has an issue with RJS and updating tables, which is why I
am trying to update the TBODY tag instead. Any ideas why this isn't
working?
Dylan M. (Guest)
on 2006-05-03 21:00
(Received via mailing list)
Well I installed the "taconite_for_prototype.js" and everything works
great now. I guess IE just has issues directly accessing the TABLE
and TBODY elements.
This topic is locked and can not be replied to.