<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Bug Day: Internet Explorer 7 SELECT element innerHTML bug</title>
	<atom:link href="http://alexle.net/archives/150/feed" rel="self" type="application/rss+xml" />
	<link>http://alexle.net/archives/150</link>
	<description>Personal View</description>
	<pubDate>Sat, 22 Nov 2008 08:26:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Andrew Eastgate</title>
		<link>http://alexle.net/archives/150#comment-230968</link>
		<dc:creator>Andrew Eastgate</dc:creator>
		<pubDate>Tue, 18 Nov 2008 15:31:28 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-230968</guid>
		<description>Site ate my HTML :( But it's meant to be like this (using square brackets instead of arrow brackets):

if (document.getElementById("sectionSelector").outerHTML) {
	document.getElementById("sectionSelector").outerHTML = "[select id='sectionSelector']" + ajax.responseText + "[/select]";
} else {
	document.getElementById("sectionSelector").innerHTML = ajax.responseText;
}</description>
		<content:encoded><![CDATA[<p>Site ate my HTML <img src='http://alexle.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> But it&#8217;s meant to be like this (using square brackets instead of arrow brackets):</p>
<p>if (document.getElementById(&#8221;sectionSelector&#8221;).outerHTML) {<br />
	document.getElementById(&#8221;sectionSelector&#8221;).outerHTML = &#8220;[select id=&#8217;sectionSelector&#8217;]&#8221; + ajax.responseText + &#8220;[/select]&#8221;;<br />
} else {<br />
	document.getElementById(&#8221;sectionSelector&#8221;).innerHTML = ajax.responseText;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Eastgate</title>
		<link>http://alexle.net/archives/150#comment-230966</link>
		<dc:creator>Andrew Eastgate</dc:creator>
		<pubDate>Tue, 18 Nov 2008 15:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-230966</guid>
		<description>I was having the same issue with the  in IE, my code is like this:

if (document.getElementById("sectionSelector").outerHTML) {
	document.getElementById("sectionSelector").outerHTML = "" + ajax.responseText + "";
} else {
	document.getElementById("sectionSelector").innerHTML = ajax.responseText;
}

Basically rewrite the whole  tag and the options (ajax.responseText in my script) if outerHTML is recognised by the browser, otherwise use the innerHTML method. Tested it and works for me in IE6, IE7, FF2, FF3, and Windows Safari.</description>
		<content:encoded><![CDATA[<p>I was having the same issue with the  in IE, my code is like this:</p>
<p>if (document.getElementById(&#8221;sectionSelector&#8221;).outerHTML) {<br />
	document.getElementById(&#8221;sectionSelector&#8221;).outerHTML = &#8220;&#8221; + ajax.responseText + &#8220;&#8221;;<br />
} else {<br />
	document.getElementById(&#8221;sectionSelector&#8221;).innerHTML = ajax.responseText;<br />
}</p>
<p>Basically rewrite the whole  tag and the options (ajax.responseText in my script) if outerHTML is recognised by the browser, otherwise use the innerHTML method. Tested it and works for me in IE6, IE7, FF2, FF3, and Windows Safari.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://alexle.net/archives/150#comment-228916</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Thu, 13 Nov 2008 00:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-228916</guid>
		<description>IE has bigger problems with innerHTML than just the select element. Setting innerHTML with certain markup [valid] throws an unknown error.
http://web.2point1.com/2008/11/12/ie-innerhtml-bug/</description>
		<content:encoded><![CDATA[<p>IE has bigger problems with innerHTML than just the select element. Setting innerHTML with certain markup [valid] throws an unknown error.<br />
<a href="http://web.2point1.com/2008/11/12/ie-innerhtml-bug/" rel="nofollow">http://web.2point1.com/2008/11/12/ie-innerhtml-bug/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WeBlog - блог про веб-программирование &#187; Blog Archive &#187; баг в IE с innerHTML в select</title>
		<link>http://alexle.net/archives/150#comment-219423</link>
		<dc:creator>WeBlog - блог про веб-программирование &#187; Blog Archive &#187; баг в IE с innerHTML в select</dc:creator>
		<pubDate>Fri, 10 Oct 2008 11:22:18 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-219423</guid>
		<description>[...] http://alexle.net/archives/150 [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] <a href="http://alexle.net/archives/150" rel="nofollow">http://alexle.net/archives/150</a> [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://alexle.net/archives/150#comment-190059</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Mon, 28 Jul 2008 21:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-190059</guid>
		<description>You will find solutions to all your IE bugs here:

http://webbugtrack.blogspot.com/search/label/innerHTML

the Select element is only one of the elements in IE that doesn't work properly with the DOM methods.</description>
		<content:encoded><![CDATA[<p>You will find solutions to all your IE bugs here:</p>
<p><a href="http://webbugtrack.blogspot.com/search/label/innerHTML" rel="nofollow">http://webbugtrack.blogspot.com/search/label/innerHTML</a></p>
<p>the Select element is only one of the elements in IE that doesn&#8217;t work properly with the DOM methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abigdog</title>
		<link>http://alexle.net/archives/150#comment-187772</link>
		<dc:creator>abigdog</dc:creator>
		<pubDate>Thu, 24 Jul 2008 08:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-187772</guid>
		<description>Olivier Voutat, your method is the way I am adding options to my select.  I used cloneNode(true) to clone an entire row of a table, appended it to the tbody.  the table row has a select in it ... when i used this method of adding options on the select in the dynamically added table row, it failes in * IE7 * (length goes to zero) .. but it does work on selects elsewhere, which happen to be non-dynamic selects in the page HTML.  whether this is specific to selects created through this "cloneNode" process in a table, or all dynamically created selects, i don't know.</description>
		<content:encoded><![CDATA[<p>Olivier Voutat, your method is the way I am adding options to my select.  I used cloneNode(true) to clone an entire row of a table, appended it to the tbody.  the table row has a select in it &#8230; when i used this method of adding options on the select in the dynamically added table row, it failes in * IE7 * (length goes to zero) .. but it does work on selects elsewhere, which happen to be non-dynamic selects in the page HTML.  whether this is specific to selects created through this &#8220;cloneNode&#8221; process in a table, or all dynamically created selects, i don&#8217;t know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abigdog</title>
		<link>http://alexle.net/archives/150#comment-187768</link>
		<dc:creator>abigdog</dc:creator>
		<pubDate>Thu, 24 Jul 2008 07:59:59 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-187768</guid>
		<description>Today in IE7 I am trying to create a select dynamically and then insert an optoin based on user input.  I am using the same code for dynamically created selects and selects in the original page HTML.  Well, with selects that were not dynamically created it works fine, even in IE.  But for the dynamically created select, which has a few options put in it when its created, what happens is that when another option added, using "insertBefore" method, on IE the select "length" property then changes to zero!  When I changed selectedIndex, that single option will show in the combo, but it won't drop-down (length 0).  I haven't solved it yet, i guess I will put the select into a div, and when I add another option, I'll just recreate the entire select.... Of course, this is working fine already in all other browsers I've tested.  Bizarre, this appears to be an IE bug specific to seletcts that were creatd using DOM methods.</description>
		<content:encoded><![CDATA[<p>Today in IE7 I am trying to create a select dynamically and then insert an optoin based on user input.  I am using the same code for dynamically created selects and selects in the original page HTML.  Well, with selects that were not dynamically created it works fine, even in IE.  But for the dynamically created select, which has a few options put in it when its created, what happens is that when another option added, using &#8220;insertBefore&#8221; method, on IE the select &#8220;length&#8221; property then changes to zero!  When I changed selectedIndex, that single option will show in the combo, but it won&#8217;t drop-down (length 0).  I haven&#8217;t solved it yet, i guess I will put the select into a div, and when I add another option, I&#8217;ll just recreate the entire select&#8230;. Of course, this is working fine already in all other browsers I&#8217;ve tested.  Bizarre, this appears to be an IE bug specific to seletcts that were creatd using DOM methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rauli</title>
		<link>http://alexle.net/archives/150#comment-187743</link>
		<dc:creator>Rauli</dc:creator>
		<pubDate>Thu, 24 Jul 2008 07:01:13 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-187743</guid>
		<description>It seems (IE7) also that some table elements are not changed by innerHTML, at least tr seems not work. Only safe elements seem to be such as div and span...??</description>
		<content:encoded><![CDATA[<p>It seems (IE7) also that some table elements are not changed by innerHTML, at least tr seems not work. Only safe elements seem to be such as div and span&#8230;??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olivier</title>
		<link>http://alexle.net/archives/150#comment-171896</link>
		<dc:creator>Olivier</dc:creator>
		<pubDate>Fri, 20 Jun 2008 20:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-171896</guid>
		<description>Just checked a couple days ago that this bug is still present in IE8 bêta...</description>
		<content:encoded><![CDATA[<p>Just checked a couple days ago that this bug is still present in IE8 bêta&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amnamak</title>
		<link>http://alexle.net/archives/150#comment-148521</link>
		<dc:creator>Amnamak</dc:creator>
		<pubDate>Mon, 28 Apr 2008 17:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/archives/150#comment-148521</guid>
		<description>I am using selectBoxOject.options[selectBoxOject.options.length] = new Option(i); . Very simple. See: http://www.devguru.com/Technologies/ecmaScript/quickref/option.html</description>
		<content:encoded><![CDATA[<p>I am using selectBoxOject.options[selectBoxOject.options.length] = new Option(i); . Very simple. See: <a href="http://www.devguru.com/Technologies/ecmaScript/quickref/option.html" rel="nofollow">http://www.devguru.com/Technologies/ecmaScript/quickref/option.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.353 seconds -->
