<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: IE JavaScript Bugs: Overriding Internet Explorer&#8217;s document.getElementById() To Be W3C Compliant Exposes An Additional Bug In getAttributes()</title>
	<atom:link href="http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes</link>
	<description>The Weblog of J. Max Wilson</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:49:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
		<item>
		<title>By: J. Max Wilson</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-523</link>
		<dc:creator>J. Max Wilson</dc:creator>
		<pubDate>Thu, 26 Feb 2009 19:09:13 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>nicowens,

Thanks so much for your comment.  I appreciate your measured thoughts and I agree with much of what you have said.

I should clarify that despite my complaints, I do believe that Microsoft, despite the antipathy regularly directed toward it, including from me at times, has done an immense amount of good for technology and for the world and has often been unjustly demonized.

For balance you should check out my post on the &lt;a href=&quot;http://www.sixteensmallstones.org/php-bug-the-magic-call-method-and-overriding-methods-in-child-classes&quot; rel=&quot;nofollow&quot;&gt;bug I discovered PHP 5.2.5&lt;/a&gt;.  It did get fixed eventually.

Programmers just like to complain. :)

Nice to meet you nicowens.</description>
		<content:encoded><![CDATA[<p>nicowens,</p>
<p>Thanks so much for your comment.  I appreciate your measured thoughts and I agree with much of what you have said.</p>
<p>I should clarify that despite my complaints, I do believe that Microsoft, despite the antipathy regularly directed toward it, including from me at times, has done an immense amount of good for technology and for the world and has often been unjustly demonized.</p>
<p>For balance you should check out my post on the <a href="http://www.sixteensmallstones.org/php-bug-the-magic-call-method-and-overriding-methods-in-child-classes" rel="nofollow">bug I discovered PHP 5.2.5</a>.  It did get fixed eventually.</p>
<p>Programmers just like to complain. <img src='http://www.sixteensmallstones.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Nice to meet you nicowens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicowens</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-522</link>
		<dc:creator>nicowens</dc:creator>
		<pubDate>Thu, 26 Feb 2009 18:45:17 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>We all appreciate the post and your selfless dedication to troubleshooting behavior issues and documenting solutions.

I&#039;m certainly no MS-zealot, but when I hear someone of your intellect and dedication do so much MS-bashing I feel the need to respond ... plus I&#039;m waiting for a DNS propogation ;)

Forget the bugs and behavior issues of some of the latest versions of IE for a moment and be open-minded.  MS doesn&#039;t intentioanlly go behind the back of the W3C, at least not since the late 90s.  I was a member of the W3C standrads body in the late 90s and understand well the shortcomings of that arrangement.  It has more to do w/ capitalism and bureaucracy.

Imagine you&#039;re a for-profit entity (don&#039;t read evil) in the middle of a heated browser war.  Your developers have great idea and have been given the go-ahead to produce whatever they want in their browser product in order to take out the dread NS.  Again, don&#039;t interpret as evil.  Those developers like everyone else loved their product and were just trying to keep their jobs and maybe get a raise.  Along ambles this slow standards-minded group that is trying desparately to inject a set of rules for all browsers to adopt.  There are two main problems w/ a standards-body like this, which is not government-regulated, in an industry that is functioning much like the Wild West at the time.  First, if MS has a great idea for their browser (read hover attribute) and the standrds-body refuses to accept it into the regulations, are you going to build it as a competitive advantage or are you going to agree and dump the idea?  Secondly, the standrds group at the time was notorioiusly slow at adopting changes or even agreeing to have the conversation in a speedy manner.

So, MS did what every other like-minded for-profit corporation would&#039;ve done w/ the right resources and ideas.  They ran w/ their ideas and left the standrads-body in the dust.  This further infuriated those members of the W3C who had self-appointed themselves the ambassadors of everything HTML/CSS at the time and it only served to further exacerbate and already defunct relationship.

The W3C reflected at the time the attitudes of its members, which were open-source people at heart and just not willing to let a giant like MS control the browser market.  it was an unwritten war that continues to this day, mostly perpetuated by people who weren&#039;t around and don&#039;t understand that MS revolutionized technologies like the WWW, CSS, XML.  We all owe a HUGE debt of gratitude to TBL for his tireless dedication to bringing this world into a new millenium.  He should be Time&#039;s Man of the Year every year for what he put together.  I don&#039;t mean to offend him or the early starters of the www since I stand so high only b/c their shoulders are so tall, broad, and strong.

Delete/disapprove if you prefer; I would understand your decision.</description>
		<content:encoded><![CDATA[<p>We all appreciate the post and your selfless dedication to troubleshooting behavior issues and documenting solutions.</p>
<p>I&#8217;m certainly no MS-zealot, but when I hear someone of your intellect and dedication do so much MS-bashing I feel the need to respond &#8230; plus I&#8217;m waiting for a DNS propogation <img src='http://www.sixteensmallstones.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Forget the bugs and behavior issues of some of the latest versions of IE for a moment and be open-minded.  MS doesn&#8217;t intentioanlly go behind the back of the W3C, at least not since the late 90s.  I was a member of the W3C standrads body in the late 90s and understand well the shortcomings of that arrangement.  It has more to do w/ capitalism and bureaucracy.</p>
<p>Imagine you&#8217;re a for-profit entity (don&#8217;t read evil) in the middle of a heated browser war.  Your developers have great idea and have been given the go-ahead to produce whatever they want in their browser product in order to take out the dread NS.  Again, don&#8217;t interpret as evil.  Those developers like everyone else loved their product and were just trying to keep their jobs and maybe get a raise.  Along ambles this slow standards-minded group that is trying desparately to inject a set of rules for all browsers to adopt.  There are two main problems w/ a standards-body like this, which is not government-regulated, in an industry that is functioning much like the Wild West at the time.  First, if MS has a great idea for their browser (read hover attribute) and the standrds-body refuses to accept it into the regulations, are you going to build it as a competitive advantage or are you going to agree and dump the idea?  Secondly, the standrds group at the time was notorioiusly slow at adopting changes or even agreeing to have the conversation in a speedy manner.</p>
<p>So, MS did what every other like-minded for-profit corporation would&#8217;ve done w/ the right resources and ideas.  They ran w/ their ideas and left the standrads-body in the dust.  This further infuriated those members of the W3C who had self-appointed themselves the ambassadors of everything HTML/CSS at the time and it only served to further exacerbate and already defunct relationship.</p>
<p>The W3C reflected at the time the attitudes of its members, which were open-source people at heart and just not willing to let a giant like MS control the browser market.  it was an unwritten war that continues to this day, mostly perpetuated by people who weren&#8217;t around and don&#8217;t understand that MS revolutionized technologies like the WWW, CSS, XML.  We all owe a HUGE debt of gratitude to TBL for his tireless dedication to bringing this world into a new millenium.  He should be Time&#8217;s Man of the Year every year for what he put together.  I don&#8217;t mean to offend him or the early starters of the www since I stand so high only b/c their shoulders are so tall, broad, and strong.</p>
<p>Delete/disapprove if you prefer; I would understand your decision.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J. Max Wilson</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-261</link>
		<dc:creator>J. Max Wilson</dc:creator>
		<pubDate>Fri, 07 Mar 2008 02:59:59 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>Michael,

	I think that the problem you are having results from the fact that my script replaces the built in document.getElementById function.

	Your script appears check to see if document.getElementById exists.  If it does then it uses it and if it doesn’t it uses the document.all array.

	Try replacing

	theobj = (document.getElementById)?document.getElementById(ele):document.all[ele];

	with:&lt;br /&gt;&lt;br /&gt;theobj = (document.nativeGetElementById)?document.getElementById(ele):document.all[ele];

	and see if that works.</description>
		<content:encoded><![CDATA[<p>Michael,</p>
<p>	I think that the problem you are having results from the fact that my script replaces the built in document.getElementById function.</p>
<p>	Your script appears check to see if document.getElementById exists.  If it does then it uses it and if it doesn’t it uses the document.all array.</p>
<p>	Try replacing</p>
<p>	theobj = (document.getElementById)?document.getElementById(ele):document.all[ele];</p>
<p>	with:</p>
<p>theobj = (document.nativeGetElementById)?document.getElementById(ele):document.all[ele];</p>
<p>	and see if that works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-260</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 07 Mar 2008 00:42:42 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>When I implement your fix, my “clock” script now throws a stack overflow on each interval.  Why would that be happening?

	(The clock uses a function I wrote that works in IE and in FIREFOX…..at least it did before the above code was added to another part of the program)

	function getElement(ele)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;var theobj = false;&lt;br /&gt;&lt;br /&gt;if(typeof ele == ‘string’)&lt;br /&gt;&lt;br /&gt;theobj = (document.getElementById)?document.getElementById(ele):document.all[ele];&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;&lt;br /&gt;theobj = ele;

	return theobj;&lt;br /&gt;&lt;br /&gt;}</description>
		<content:encoded><![CDATA[<p>When I implement your fix, my “clock” script now throws a stack overflow on each interval.  Why would that be happening?</p>
<p>	(The clock uses a function I wrote that works in IE and in FIREFOX…..at least it did before the above code was added to another part of the program)</p>
<p>	function getElement(ele)</p>
<p>{</p>
<p>var theobj = false;</p>
<p>if(typeof ele == ‘string’)</p>
<p>theobj = (document.getElementById)?document.getElementById(ele):document.all[ele];</p>
<p>else</p>
<p>theobj = ele;</p>
<p>	return theobj;</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sander Aarts</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-258</link>
		<dc:creator>Sander Aarts</dc:creator>
		<pubDate>Thu, 14 Feb 2008 11:25:10 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>Thanks for the script. I noticed that it doesn’t work for Opera though, which has the same bug. So I took the liberty of rewriting you script to make it work for Opera as well. In this version the function will rewrite itself depending whether document.all is available (IE + Opera) or not.&lt;br /&gt;&lt;br /&gt;I’ve tested the script on IE7, Fx2 and Op9.

	document.nativeGetElementById = document.getElementById;&lt;br /&gt;&lt;br /&gt;document.getElementById = function( id ) {

	if ( document.all ) {// only override when document.all is supported (IE + Opera)

	document.getElementById = function( id ) {&lt;br /&gt;&lt;br /&gt;var elem = document.nativeGetElementById( id );&lt;br /&gt;&lt;br /&gt;if ( !elem ) return null;

	// make sure that it is a valid match on id&lt;br /&gt;&lt;br /&gt;if ( elem.attributes[‘id’] &amp;&amp; elem.attributes[‘id’].value  id ) return elem;

	// otherwise find the correct element&lt;br /&gt;&lt;br /&gt;for ( var i = 1; i &lt; document.all[ id ].length; i++ ) {&lt;br /&gt;&lt;br /&gt;if ( document.all[ id ][ i ].attributes[ &#039;id&#039; ].value  id ) return document.all[ id ][ i ];&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;};

	} else {// otherwise change back to original

	document.getElementById = document.nativeGetElementById;&lt;br /&gt;&lt;br /&gt;document.nativeGetElementById = null;// we don’t need it anymore

	}&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;document.getElementById();// run document.getElementById() once to let it rewrite itself

	Hope you like it.</description>
		<content:encoded><![CDATA[<p>Thanks for the script. I noticed that it doesn’t work for Opera though, which has the same bug. So I took the liberty of rewriting you script to make it work for Opera as well. In this version the function will rewrite itself depending whether document.all is available (IE + Opera) or not.</p>
<p>I’ve tested the script on IE7, Fx2 and Op9.</p>
<p>	document.nativeGetElementById = document.getElementById;</p>
<p>document.getElementById = function( id ) {</p>
<p>	if ( document.all ) {// only override when document.all is supported (IE + Opera)</p>
<p>	document.getElementById = function( id ) {</p>
<p>var elem = document.nativeGetElementById( id );</p>
<p>if ( !elem ) return null;</p>
<p>	// make sure that it is a valid match on id</p>
<p>if ( elem.attributes[‘id’] &#038;&#038; elem.attributes[‘id’].value  id ) return elem;</p>
<p>	// otherwise find the correct element</p>
<p>for ( var i = 1; i < document.all[ id ].length; i++ ) {</p>
<p>if ( document.all[ id ][ i ].attributes[ 'id' ].value  id ) return document.all[ id ][ i ];</p>
<p>}</p>
<p>};</p>
<p>	} else {// otherwise change back to original</p>
<p>	document.getElementById = document.nativeGetElementById;</p>
<p>document.nativeGetElementById = null;// we don’t need it anymore</p>
<p>	}</p>
<p>};</p>
<p>document.getElementById();// run document.getElementById() once to let it rewrite itself</p>
<p>	Hope you like it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magrolino</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-257</link>
		<dc:creator>magrolino</dc:creator>
		<pubDate>Wed, 13 Feb 2008 17:22:47 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>wow, thx for pointing (and fixing) this out, I am sure this will come in handy!</description>
		<content:encoded><![CDATA[<p>wow, thx for pointing (and fixing) this out, I am sure this will come in handy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven H</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-254</link>
		<dc:creator>Steven H</dc:creator>
		<pubDate>Wed, 12 Dec 2007 03:30:25 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>Absolutely amazing post!  Thanks for the fix I’ve been looking for for longer than I can remember.</description>
		<content:encoded><![CDATA[<p>Absolutely amazing post!  Thanks for the fix I’ve been looking for for longer than I can remember.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob J</title>
		<link>http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes/comment-page-1#comment-253</link>
		<dc:creator>Jacob J</dc:creator>
		<pubDate>Fri, 16 Nov 2007 09:09:49 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>Nicely explained and very frustrating.</description>
		<content:encoded><![CDATA[<p>Nicely explained and very frustrating.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

