# Replace\_html on a select fails on IE and Opera

**URL:** <https://www.ruby-forum.com/t/replace-html-on-a-select-fails-on-ie-and-opera/59930>\
**Category:** Rails\
**Created:** [May 8, 2006, 8:34pm UTC](https://www.ruby-forum.com/t/replace-html-on-a-select-fails-on-ie-and-opera/59930 "2006-05-08T20:34:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hknaksu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hknaksu](https://www.ruby-forum.com/u/hknaksu)\
**Post date:** [May 8, 2006, 8:34pm UTC](https://www.ruby-forum.com/t/replace-html-on-a-select-fails-on-ie-and-opera/59930/1 "2006-05-08T20:34:34Z")

</div>

I am using an rjs file to do a page.replace\_html on a select field as  
follows:

@inrhtml = options\_from\_collection\_for\_select( @widgets, “id”, “name”)  
page.replace\_html “type\_select”, @inrhtml

I have it working on firefox and safari but it doesn’t work on IE and  
opera?  
My javascript defaults are up-to-date.

I would appreciate any help.  
thx,  
-hkn

---

<div class="post-metadata">

**Author:** ![hknaksu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hknaksu](https://www.ruby-forum.com/u/hknaksu)\
**Post date:** [May 9, 2006, 1:24am UTC](https://www.ruby-forum.com/t/replace-html-on-a-select-fails-on-ie-and-opera/59930/2 "2006-05-09T01:24:12Z")

</div>

You cannot use this in IE. Don’t know about Opera.

IE doese not support the innerHTML js function on select boxes amongst  
other things.

Ezra gave a solution to this problem a while back. Sorri but I don’t  
have it in front of me. If you search in RForum for a post with  
Dynamic in the title and a reply by Ezra you will find it.
