<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: We all love innerHTML</title>
	<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/</link>
	<description>Web development and Internet trends</description>
	<pubDate>Sun, 20 Jul 2008 19:14:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
		<item>
		<title>By: Darren</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-326391</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Thu, 03 Jul 2008 13:54:54 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-326391</guid>
		<description>Thank you so much all; I had the &#60;form&#62; tags inside the &#60;table&#62; tags . IE had no problems with it, but Firefox, Opera and Safari refused to recognise the AJAX imported select box. :)</description>
		<content:encoded><![CDATA[<p>Thank you so much all; I had the &lt;form&gt; tags inside the &lt;table&gt; tags . <acronym title="Internet Explorer">IE</acronym> had no problems with it, but Firefox, Opera and Safari refused to recognise the <acronym title="Asynchronous Javascript and XML">AJAX</acronym> imported select box. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie Cheng</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-146373</link>
		<dc:creator>Charlie Cheng</dc:creator>
		<pubDate>Wed, 21 Nov 2007 04:28:48 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-146373</guid>
		<description>Great article, in firefox, Although, i didn't mess up the tags. But the following may cause the same problem 

&#60;table&#62;
&#60;form ...&#62;
....form field mixed with  for layout purpose
&#60;/form&#62;
&#60;/table&#62;

Move to the following format will make the thing work

&#60;form ...&#62;
&#60;table&#62;
....form field mixed with  for layout purpose
&#60;/table&#62;
&#60;/form&#62;


Thanks for reminding although i don't exactly problem as you guys. But it does shorten my debugging time.

Charlie</description>
		<content:encoded><![CDATA[<p>Great article, in firefox, Although, i didn&#8217;t mess up the tags. But the following may cause the same problem </p>
<p>&lt;table&gt;<br />
&lt;form &#8230;&gt;<br />
&#8230;.form field mixed with  for layout purpose<br />
&lt;/form&gt;<br />
&lt;/table&gt;</p>
<p>Move to the following format will make the thing work</p>
<p>&lt;form &#8230;&gt;<br />
&lt;table&gt;<br />
&#8230;.form field mixed with  for layout purpose<br />
&lt;/table&gt;<br />
&lt;/form&gt;</p>
<p>Thanks for reminding although i don&#8217;t exactly problem as you guys. But it does shorten my debugging time.</p>
<p>Charlie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: e</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-90443</link>
		<dc:creator>e</dc:creator>
		<pubDate>Sat, 11 Aug 2007 15:31:08 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-90443</guid>
		<description>Also... I'm using a span section around the select field to update it.  I'm just giving the span an id and then grabbing onto that with innerHTML.

All of this works fine in IE, just not FireFox.

Thanks again.</description>
		<content:encoded><![CDATA[<p>Also&#8230; I&#8217;m using a span section around the select field to update it.  I&#8217;m just giving the span an id and then grabbing onto that with innerHTML.</p>
<p>All of this works fine in <acronym title="Internet Explorer">IE</acronym>, just not FireFox.</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: e</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-90441</link>
		<dc:creator>e</dc:creator>
		<pubDate>Sat, 11 Aug 2007 15:26:01 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-90441</guid>
		<description>In regards to problems with inserting form elements with innerHTML in FireFox, is there some other reading I should find on this site?  I ask because it seems that Cedric may have found something more.  

I'm facing a problem very similar to stocknsurf.  I'm not quite sure if it's related to nesting of form tags because there aren't any div layers used on this page.  Could the way the form is nested inside of tables cause the same problem?

Everything works fine in FireFox until innerHTML is used to update a select field inside the form.  Even when the update doesn't cause any changes to the select field (just re-draws it), FireFox stops recognizing the select field.  It's as if the select field no longer exists.</description>
		<content:encoded><![CDATA[<p>In regards to problems with inserting form elements with innerHTML in FireFox, is there some other reading I should find on this site?  I ask because it seems that Cedric may have found something more.  </p>
<p>I&#8217;m facing a problem very similar to stocknsurf.  I&#8217;m not quite sure if it&#8217;s related to nesting of form tags because there aren&#8217;t any div layers used on this page.  Could the way the form is nested inside of tables cause the same problem?</p>
<p>Everything works fine in FireFox until innerHTML is used to update a select field inside the form.  Even when the update doesn&#8217;t cause any changes to the select field (just re-draws it), FireFox stops recognizing the select field.  It&#8217;s as if the select field no longer exists.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thanh Le Quoc</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-43957</link>
		<dc:creator>Thanh Le Quoc</dc:creator>
		<pubDate>Fri, 23 Mar 2007 03:53:34 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-43957</guid>
		<description>Thanks so much...

I also have faced with this problem.</description>
		<content:encoded><![CDATA[<p>Thanks so much&#8230;</p>
<p>I also have faced with this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-39228</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Wed, 28 Feb 2007 18:52:39 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-39228</guid>
		<description>Cedric,

Glad you found the solution here! :-)</description>
		<content:encoded><![CDATA[<p>Cedric,</p>
<p>Glad you found the solution here! <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cedric Colpaert</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-39220</link>
		<dc:creator>Cedric Colpaert</dc:creator>
		<pubDate>Wed, 28 Feb 2007 17:11:28 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-39220</guid>
		<description>I had the same problem with the form elements inside innerhtml.. I've spend hours and hours on this.. and there's only one website (this one) where you can find the solution</description>
		<content:encoded><![CDATA[<p>I had the same problem with the form elements inside innerhtml.. I&#8217;ve spend hours and hours on this.. and there&#8217;s only one website (this one) where you can find the solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jiv</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-16912</link>
		<dc:creator>Jiv</dc:creator>
		<pubDate>Wed, 15 Nov 2006 16:51:45 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-16912</guid>
		<description>In past, I found a way to get rid of the gap IE was putting at the top of the page (equiv. to a ) when inserting the form element like this
&lt;code&gt;



    ... 



&lt;/code&gt;
But if you have a look in the DOM source of Firefox you'll see that weird result
&lt;code&gt;

&lt;strong&gt;&lt;/strong&gt;

    ... 


&lt;/code&gt;
This can be a possible cause why your variables doesn't get posted!</description>
		<content:encoded><![CDATA[<p>In past, I found a way to get rid of the gap <acronym title="Internet Explorer">IE</acronym> was putting at the top of the page (equiv. to a ) when inserting the form element like this<br />
<code></p>
<p>    ... </p>
<p></code><br />
But if you have a look in the <acronym title="Document Object Model">DOM</acronym> source of Firefox you&#8217;ll see that weird result<br />
<code></p>
<p><strong></strong></p>
<p>    &#8230; </p>
<p></code><br />
This can be a possible cause why your variables doesn&#8217;t get posted!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zhenya</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-14086</link>
		<dc:creator>zhenya</dc:creator>
		<pubDate>Mon, 30 Oct 2006 15:51:09 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-14086</guid>
		<description>Tref, I also want to thank you. I've spent 4 hours today trying to solve same problem and after I read your message I only had to make cut-past and it worked!</description>
		<content:encoded><![CDATA[<p>Tref, I also want to thank you. I&#8217;ve spent 4 hours today trying to solve same problem and after I read your message I only had to make cut-past and it worked!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jp</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-12590</link>
		<dc:creator>jp</dc:creator>
		<pubDate>Mon, 16 Oct 2006 15:47:42 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-12590</guid>
		<description>Thank you so much tref, that was the problem for me too. I thought it would never be solved...</description>
		<content:encoded><![CDATA[<p>Thank you so much tref, that was the problem for me too. I thought it would never be solved&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-11261</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 03 Oct 2006 06:38:54 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-11261</guid>
		<description>Tref,

Thanks for the info.</description>
		<content:encoded><![CDATA[<p>Tref,</p>
<p>Thanks for the info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tref</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-11259</link>
		<dc:creator>Tref</dc:creator>
		<pubDate>Tue, 03 Oct 2006 06:01:20 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-11259</guid>
		<description>Forgive me.. my explanation was back to front.. should read

&lt;blockquote&gt;
The answer was in the nesting of the form fields. The opening form tag was above the â€œpageâ€, whereas the closing tag was between the closing of the "main" and the â€œpageâ€ div.

&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>Forgive me.. my explanation was back to front.. should read</p>
<blockquote><p>
The answer was in the nesting of the form fields. The opening form tag was above the â€œpageâ€, whereas the closing tag was between the closing of the &#8220;main&#8221; and the â€œpageâ€ div.</p>
</blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tref</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-11258</link>
		<dc:creator>Tref</dc:creator>
		<pubDate>Tue, 03 Oct 2006 05:58:59 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-11258</guid>
		<description>stocknsurf,  I've just had to debug a similar scenario so in case you haven't located the answer here's what I found out.

Firefox may not accept your ajax imported form elements if the opening and closing form tags are not nested correctly.

For example we had a page that had the following structure.
&lt;code&gt;

&#60; body&#62;

&#60; form name="form1" method="post" action="gohere.jsp"  &#62;

&#60; div id="page"&#62;

   &#60; div id="main"  &#62;

   ... main content with form elements went here..

  ... some dynamic form elements were inserted using ajax calls

   &#60;/div &#62;

&#60;/form &#62;

&#60;/div &#62;
&#60;/body &#62;

&lt;/code&gt;

We were  inserting some form fields into the form via an ajax call but in firefox they were not showing up.  We could access them by document.getElementById but document.form1.foo was coming up "undefined"

The answer was in the nesting of the form fields.  The opening tag was between the "page" and "main" divs, whereas the closing tag was after the closing "page" div.

Hope that helps your situation

cheers</description>
		<content:encoded><![CDATA[<p>stocknsurf,  I&#8217;ve just had to debug a similar scenario so in case you haven&#8217;t located the answer here&#8217;s what I found out.</p>
<p>Firefox may not accept your <acronym title="Asynchronous Javascript and XML">AJAX</acronym> imported form elements if the opening and closing form tags are not nested correctly.</p>
<p>For example we had a page that had the following structure.<br />
<code></p>
<p>&lt; body&gt;</p>
<p>&lt; form name="form1" method="post" action="gohere.jsp"  &gt;</p>
<p>&lt; div id="page"&gt;</p>
<p>   &lt; div id="main"  &gt;</p>
<p>   ... main content with form elements went here..</p>
<p>  ... some dynamic form elements were inserted using <acronym title="Asynchronous Javascript and XML">AJAX</acronym> calls</p>
<p>   &lt;/div &gt;</p>
<p>&lt;/form &gt;</p>
<p>&lt;/div &gt;<br />
&lt;/body &gt;</p>
<p></code></p>
<p>We were  inserting some form fields into the form via an <acronym title="Asynchronous Javascript and XML">AJAX</acronym> call but in firefox they were not showing up.  We could access them by document.getElementById but document.form1.foo was coming up &#8220;undefined&#8221;</p>
<p>The answer was in the nesting of the form fields.  The opening tag was between the &#8220;page&#8221; and &#8220;main&#8221; divs, whereas the closing tag was after the closing &#8220;page&#8221; div.</p>
<p>Hope that helps your situation</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-7802</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 29 Aug 2006 10:11:20 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-7802</guid>
		<description>stocknsurf,

I haven't encountered this myself, but my guess is that Firefox looks at form fields in a different way. This might be a scenario where you will have to resort to DOM methods like &lt;code&gt;createElement&lt;/code&gt;, &lt;code&gt;appendChild&lt;/code&gt; etc to make it work.

Good luck!</description>
		<content:encoded><![CDATA[<p>stocknsurf,</p>
<p>I haven&#8217;t encountered this myself, but my guess is that Firefox looks at form fields in a different way. This might be a scenario where you will have to resort to <acronym title="Document Object Model">DOM</acronym> methods like <code>createElement</code>, <code>appendChild</code> etc to make it work.</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stocknsurf</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-7799</link>
		<dc:creator>stocknsurf</dc:creator>
		<pubDate>Tue, 29 Aug 2006 10:05:15 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-7799</guid>
		<description>Hi I am facing a problem with innerhtml in firefox.

Basically this is the issue:

I have a divid content which is changed dynamically using innerHTML.  This divid is inside a form and as a part of the dynamic content I am adding new form fields dynamically using innerHTML (based on user actions).

But the problem is when the form is submitted from firefox, these new form fields don't get passed on to the server side at all.  Only the static fields that already existed get passed on.

This is the problem I face only with firefox. On IE the new form fields added using innerHTML gets passed on to the server side successfully.

I am splitting my hair over this problem with firefox. Has anyone faced the same issue? How do I solve this?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi I am facing a problem with innerhtml in firefox.</p>
<p>Basically this is the issue:</p>
<p>I have a divid content which is changed dynamically using innerHTML.  This divid is inside a form and as a part of the dynamic content I am adding new form fields dynamically using innerHTML (based on user actions).</p>
<p>But the problem is when the form is submitted from firefox, these new form fields don&#8217;t get passed on to the server side at all.  Only the static fields that already existed get passed on.</p>
<p>This is the problem I face only with firefox. On <acronym title="Internet Explorer">IE</acronym> the new form fields added using innerHTML gets passed on to the server side successfully.</p>
<p>I am splitting my hair over this problem with firefox. Has anyone faced the same issue? How do I solve this?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4392</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Thu, 27 Apr 2006 08:33:46 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4392</guid>
		<description>AsbjÃ¸rn,

I'm happy to hear that you share our opinions!</description>
		<content:encoded><![CDATA[<p>AsbjÃ¸rn,</p>
<p>I&#8217;m happy to hear that you share our opinions!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AsbjÃ¸rn Ulsberg</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4383</link>
		<dc:creator>AsbjÃ¸rn Ulsberg</dc:creator>
		<pubDate>Wed, 26 Apr 2006 22:11:51 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4383</guid>
		<description>Standardising &lt;code&gt;innerHTML&lt;/code&gt; is a Good Thing. No doubt. It's a de facto standard and we're all better off with it being a real standard. Let's just hope we can get it better specified, perhaps with some error handling (when the document is in standard mode and invalid markup is inserted, an exception could occur for example) and maybe even a better name (&lt;code&gt;innerMarkup&lt;/code&gt; and &lt;code&gt;outerMarkup&lt;/code&gt; would be nice).</description>
		<content:encoded><![CDATA[<p>Standardising <code>innerHTML</code> is a Good Thing. No doubt. It&#8217;s a de facto standard and we&#8217;re all better off with it being a real standard. Let&#8217;s just hope we can get it better specified, perhaps with some error handling (when the document is in standard mode and invalid markup is inserted, an exception could occur for example) and maybe even a better name (<code>innerMarkup</code> and <code>outerMarkup</code> would be nice).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4234</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Sun, 23 Apr 2006 19:44:43 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4234</guid>
		<description>Aristotle,

&lt;blockquote&gt;So you have a situation where thereâ€™s a pragmatic but bug-prone API, and a precise but indescribably painful one.&lt;/blockquote&gt;

I think that sums it up pretty well. But between those two, I'd go for the pragmatic one, given the current situation.

Not sure if &lt;a href="http://en.wikipedia.org/wiki/E4X" rel="nofollow"&gt;E4X&lt;/a&gt; is the solution to all, but it definitely sounds like an interesting option!</description>
		<content:encoded><![CDATA[<p>Aristotle,</p>
<blockquote><p>So you have a situation where thereâ€™s a pragmatic but bug-prone <acronym title="Application Programming Interface">API</acronym>, and a precise but indescribably painful one.</p></blockquote>
<p>I think that sums it up pretty well. But between those two, I&#8217;d go for the pragmatic one, given the current situation.</p>
<p>Not sure if <a href="http://en.wikipedia.org/wiki/E4X" rel="nofollow">E4X</a> is the solution to all, but it definitely sounds like an interesting option!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aristotle Pagaltzis</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4225</link>
		<dc:creator>Aristotle Pagaltzis</dc:creator>
		<pubDate>Sun, 23 Apr 2006 09:33:46 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4225</guid>
		<description>DOM blows, any way you turn it. It&#8217;s clumsy and extremely verbose. Only things like DOM Builder make it tolerable. However, innerHTML blows far worse for exposing you to the vagaries of multiple layers and dealing with escaping.

So you have a situation where there&#8217;s a pragmatic but bug-prone API, and a precise but indescribably painful one.

The answer is clear: we need cross-browser E4X and &lt;em&gt;we need it now&lt;/em&gt;.</description>
		<content:encoded><![CDATA[<p><acronym title="Document Object Model">DOM</acronym> blows, any way you turn it. It&#8217;s clumsy and extremely verbose. Only things like <acronym title="Document Object Model">DOM</acronym> Builder make it tolerable. However, innerHTML blows far worse for exposing you to the vagaries of multiple layers and dealing with escaping.</p>
<p>So you have a situation where there&#8217;s a pragmatic but bug-prone <acronym title="Application Programming Interface">API</acronym>, and a precise but indescribably painful one.</p>
<p>The answer is clear: we need cross-browser E4X and <em>we need it now</em>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurens Holst</title>
		<link>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4200</link>
		<dc:creator>Laurens Holst</dc:creator>
		<pubDate>Fri, 21 Apr 2006 22:19:53 +0000</pubDate>
		<guid>http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/#comment-4200</guid>
		<description>Indeed :).</description>
		<content:encoded><![CDATA[<p>Indeed :).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
