Forum: Ruby on Rails Ajax.Updater dropping first <OPTION> on 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.
496ed7f402fc56b1f997855941272ad4?d=identicon&s=25 Pete Forde (Guest)
on 2006-03-22 07:47
(Received via mailing list)
I am attempting to use Ajax.Updater to update the innerHTML of a SELECT
-
that is, to feed it a list of <option>..</option> sets generated from a
partial.

It works as expected on FF1.5, but in IE6 it renders as an empty select.
When I use the DOM viewer (or an alert()) to dump the value of
innerHTML, it
appears intact EXCEPT that the first <option> is missing with no
explanation.

I've tried an increasingly ridiculous set of things to fool IE into
rendering properly, including <option><option>..</option> on the first
partial iteration.. nothing. Frankly, it's a little Twilight Zone.

Is this just old news? Do I have to resort to using
document.createElement('OPTION') here?

Pete
496ed7f402fc56b1f997855941272ad4?d=identicon&s=25 Pete Forde (Guest)
on 2006-03-22 08:01
(Received via mailing list)
Of course, the "a-ha!" came moments after posting..

http://www.roryhansen.ca/?p=9

"You cannot modify the InnerHTML of a select drop-down list. Instead,
you
have to modify the InnerHTML of the div that _contains_ the select
drop-down
list, and when you do you have to recreate the whole drop-down."

Who hates IE? I do - more each day, actually.

----- Original Message -----
From: "Pete Forde" <pete@unspace.ca>
To: <rails@lists.rubyonrails.org>
Sent: Wednesday, March 22, 2006 1:48 AM
Subject: [Rails] Ajax.Updater dropping first <OPTION> on IE?
This topic is locked and can not be replied to.