<?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: Unknown runtime error in Internet explorer?</title>
	<atom:link href="http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/</link>
	<description></description>
	<lastBuildDate>Tue, 27 Oct 2009 09:48:02 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Deepika</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-29946</link>
		<dc:creator>Deepika</dc:creator>
		<pubDate>Thu, 22 Oct 2009 13:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-29946</guid>
		<description>Hi,

I am facing same problem.I am using div but still error is coming.
Please help me out.

My code is

&lt;pre&gt;
function updatepage(str,arg){
	
	//alert(str);str=html element

	var obj=document.getElementById(&#039;sub3&#039;);
	try
	{
		obj.innerHTML=str;
	}
	catch(ex)
	{
	alert(ex.message); // never displayed
	}
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am facing same problem.I am using div but still error is coming.<br />
Please help me out.</p>
<p>My code is</p>
<p><pre><pre>
function updatepage(str,arg){
&nbsp;&nbsp;
&nbsp;&nbsp;//alert(str);str=html element

&nbsp;&nbsp;var obj=document.getElementById(&#039;sub3&#039;);
&nbsp;&nbsp;try
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;obj.innerHTML=str;
&nbsp;&nbsp;}
&nbsp;&nbsp;catch(ex)
&nbsp;&nbsp;{
&nbsp;&nbsp;alert(ex.message); // never displayed
&nbsp;&nbsp;}
}
</pre></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russell Dodd</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-28672</link>
		<dc:creator>Russell Dodd</dc:creator>
		<pubDate>Wed, 26 Aug 2009 18:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-28672</guid>
		<description>Thanks, my error was I had a &lt;a tag surrounding div tag (it was a same page #anchor tag); closed the tag before starting the div and all was well</description>
		<content:encoded><![CDATA[<p>Thanks, my error was I had a &lt;a tag surrounding div tag (it was a same page #anchor tag); closed the tag before starting the div and all was well</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agnor</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-28541</link>
		<dc:creator>agnor</dc:creator>
		<pubDate>Wed, 19 Aug 2009 18:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-28541</guid>
		<description>big help, thanks for the post.  Dumb to require email addresses for comments, though.</description>
		<content:encoded><![CDATA[<p>big help, thanks for the post.  Dumb to require email addresses for comments, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-28148</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Sun, 02 Aug 2009 03:00:35 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-28148</guid>
		<description>I googled &#039;getelementbyid Ie6 runtime error&#039; and this was the first search result.  I had exactly the same problem you are having in your blog post and I thank you for pointing out this solution.

-Justin</description>
		<content:encoded><![CDATA[<p>I googled &#8216;getelementbyid Ie6 runtime error&#8217; and this was the first search result.  I had exactly the same problem you are having in your blog post and I thank you for pointing out this solution.</p>
<p>-Justin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kverkagambo</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-27682</link>
		<dc:creator>Kverkagambo</dc:creator>
		<pubDate>Sun, 12 Jul 2009 12:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-27682</guid>
		<description>I just had this problem in IE8, when I was trying to put Ajax form in a DIV. I just had forgotten that form tags where already opened around the div.
They could at least rename this to &quot;Web standarts error&quot; or something, it would be more helpful.</description>
		<content:encoded><![CDATA[<p>I just had this problem in IE8, when I was trying to put Ajax form in a DIV. I just had forgotten that form tags where already opened around the div.<br />
They could at least rename this to &#8220;Web standarts error&#8221; or something, it would be more helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-27090</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 18 Jun 2009 13:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-27090</guid>
		<description>When in doubt, switch from Ps to DIVs. No idea why that has any bearing on anything because what I was doing was using Prototype&#039;s &quot;wrap&quot; function to wrap an A in another DIV then insert a second DIV inside the first div ahead of the A (an absolutely-positioned overlay over the original A which contained an image, using the &quot;wrapper&quot; div which had its position set to relative to allow it to line up correctly).

It worked fine in some instances but not in others (got the &quot;unknown error&quot; or NO ERROR AT ALL (zero feedback, it just refused to do what I was telling it to -- nice!) depending on how I wrote it).

I finally noticed that the ONLY difference was that the ones that worked had a DIV as the immediate ancestor of the A but the ones that didn&#039;t had a P as the ancestor. Switching to DIVs fixed it (just plain old P and DIV tags in the HTML, no CSS applied, not written in dynamically...).

Why the parent element had any effect at all I can&#039;t imagine because all of the DOM changes were further down the tree, and the wrap wasn&#039;t the problem, it was inserting that second div which was then inside a div so it shouldn&#039;t have had this problem, but it is what it is.</description>
		<content:encoded><![CDATA[<p>When in doubt, switch from Ps to DIVs. No idea why that has any bearing on anything because what I was doing was using Prototype&#8217;s &#8220;wrap&#8221; function to wrap an A in another DIV then insert a second DIV inside the first div ahead of the A (an absolutely-positioned overlay over the original A which contained an image, using the &#8220;wrapper&#8221; div which had its position set to relative to allow it to line up correctly).</p>
<p>It worked fine in some instances but not in others (got the &#8220;unknown error&#8221; or NO ERROR AT ALL (zero feedback, it just refused to do what I was telling it to &#8212; nice!) depending on how I wrote it).</p>
<p>I finally noticed that the ONLY difference was that the ones that worked had a DIV as the immediate ancestor of the A but the ones that didn&#8217;t had a P as the ancestor. Switching to DIVs fixed it (just plain old P and DIV tags in the HTML, no CSS applied, not written in dynamically&#8230;).</p>
<p>Why the parent element had any effect at all I can&#8217;t imagine because all of the DOM changes were further down the tree, and the wrap wasn&#8217;t the problem, it was inserting that second div which was then inside a div so it shouldn&#8217;t have had this problem, but it is what it is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-27048</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 17 Jun 2009 20:48:10 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-27048</guid>
		<description>Nice that you can nest block elements inside an [a] in the HTML but can&#039;t do it by updating via JS. IE8&#039;s out now, can&#039;t MS kill 6? Normally I&#039;d hate so say &quot;Microsoft, please force an update on me via Windows Update&quot; but this is one exception to that.</description>
		<content:encoded><![CDATA[<p>Nice that you can nest block elements inside an [a] in the HTML but can&#8217;t do it by updating via JS. IE8&#8217;s out now, can&#8217;t MS kill 6? Normally I&#8217;d hate so say &#8220;Microsoft, please force an update on me via Windows Update&#8221; but this is one exception to that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lux</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-2/#comment-26835</link>
		<dc:creator>lux</dc:creator>
		<pubDate>Fri, 12 Jun 2009 07:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-26835</guid>
		<description>IE tends to confuse an element&#039;s Name property and Id property. It means that, when there is an input element as &lt;input name=&#039;someelement&#039;&gt; and a div element as &lt;div id=&#039;someelement&#039;&gt;, getElementById(&#039;someelement&#039;) may return the &lt;input&gt; element instead of the &lt;div&gt; element.

so it&#039;d be helpful to look into the TagName of the element you are trying to set the innerHTML, as the following example:

catch(ex) {
&#160;&#160;alert(obj.tagName);
}</description>
		<content:encoded><![CDATA[<p>IE tends to confuse an element&#8217;s Name property and Id property. It means that, when there is an input element as &lt;input name=&#8217;someelement&#8217;&gt; and a div element as &lt;div id=&#8217;someelement&#8217;&gt;, getElementById(&#8217;someelement&#8217;) may return the &lt;input&gt; element instead of the &lt;div&gt; element.</p>
<p>so it&#8217;d be helpful to look into the TagName of the element you are trying to set the innerHTML, as the following example:</p>
<p>catch(ex) {<br />
&nbsp;&nbsp;alert(obj.tagName);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Forrest</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-1/#comment-24466</link>
		<dc:creator>Forrest</dc:creator>
		<pubDate>Sun, 12 Apr 2009 16:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-24466</guid>
		<description>This was helpful. What caught me, was that the block element was created no problem. It just couldn&#039;t take changes after the fact.

Thanks again.</description>
		<content:encoded><![CDATA[<p>This was helpful. What caught me, was that the block element was created no problem. It just couldn&#8217;t take changes after the fact.</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ethan</title>
		<link>http://www.gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/comment-page-1/#comment-23724</link>
		<dc:creator>ethan</dc:creator>
		<pubDate>Thu, 19 Mar 2009 17:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/19/unknown-runtime-error-in-internet-explorer/#comment-23724</guid>
		<description>this should b obvious...
BUT for anyone who&#039;s doing integration and is going through heaps of codes... 
If the injection occurs in a form tag
Plz make sure the innerHTML that your injecting does not contain another form tag
or u&#039;ll hav tis famous error also</description>
		<content:encoded><![CDATA[<p>this should b obvious&#8230;<br />
BUT for anyone who&#8217;s doing integration and is going through heaps of codes&#8230;<br />
If the injection occurs in a form tag<br />
Plz make sure the innerHTML that your injecting does not contain another form tag<br />
or u&#8217;ll hav tis famous error also</p>
]]></content:encoded>
	</item>
</channel>
</rss>
