<?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: Textarea with Javascript Bug in Firefox 2.x and Up</title>
	<atom:link href="http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/</link>
	<description>Dream. Design. Code.</description>
	<lastBuildDate>Wed, 28 Sep 2011 10:47:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Patrick</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-46679</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Sat, 25 Jul 2009 16:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-46679</guid>
		<description>I&#039;ve recently come across this bug, and it exists in Firefox versions up to 3.5.1 at least. I don&#039;t believe it will be addressed. It&#039;s probably best to stick to value like other form elements. Editing the innerHTML is a bit tasteless.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve recently come across this bug, and it exists in Firefox versions up to 3.5.1 at least. I don&#8217;t believe it will be addressed. It&#8217;s probably best to stick to value like other form elements. Editing the innerHTML is a bit tasteless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: some</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40465</link>
		<dc:creator>some</dc:creator>
		<pubDate>Tue, 23 Dec 2008 03:54:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40465</guid>
		<description>Hello again, Just stumbled on this when I was searching for another
ting. &lt;a href=&quot;https://developer.mozilla.org/En/DOM:element.innerHTML&quot; title=&quot;Mozilla&quot; rel=&quot;nofollow&quot;&gt;about innerHTML: &quot;As there is no public specification for this property, implementations differ widely. For example, when text is entered into a text input, IE will change the value attribute of the input&#039;s innerHTML property but Gecko browsers do not.&quot;&lt;/a&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx&quot; title=&quot;Microsoft&quot; rel=&quot;nofollow&quot;&gt;about innerHTML: &quot;There is no public standard that applies to this property.&quot;&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Hello again, Just stumbled on this when I was searching for another<br />
ting. <a href="https://developer.mozilla.org/En/DOM:element.innerHTML" title="Mozilla" rel="nofollow">about innerHTML: &#8220;As there is no public specification for this property, implementations differ widely. For example, when text is entered into a text input, IE will change the value attribute of the input&#8217;s innerHTML property but Gecko browsers do not.&#8221;</a><br />
<a href="http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx" title="Microsoft" rel="nofollow">about innerHTML: &#8220;There is no public standard that applies to this property.&#8221;</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyorgy Fekete</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40204</link>
		<dc:creator>Gyorgy Fekete</dc:creator>
		<pubDate>Tue, 16 Dec 2008 14:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40204</guid>
		<description>wordpress 2.7 is f** my theme&#039;s markup...</description>
		<content:encoded><![CDATA[<p>wordpress 2.7 is f** my theme&#8217;s markup&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: some</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40199</link>
		<dc:creator>some</dc:creator>
		<pubDate>Tue, 16 Dec 2008 11:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40199</guid>
		<description>How nice that it have inserted br tags and breaking the links...</description>
		<content:encoded><![CDATA[<p>How nice that it have inserted br tags and breaking the links&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: some</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40198</link>
		<dc:creator>some</dc:creator>
		<pubDate>Tue, 16 Dec 2008 11:45:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40198</guid>
		<description>Gyorgy Fekete: You are referring to the specification for (X)HTML markup, and whats allowed is specified in a &lt;a href=&quot;http://en.wikipedia.org/wiki/Document_Type_Definition&quot; title=&quot;Document Type Definition&quot; rel=&quot;nofollow&quot;&gt;also known as DTD&lt;/a&gt;. 

But that has very little to do with javascript. In javascript each element is defined as an javascript object, and that object usually have the same attributes as defined in the DTD but not always with the same name. And, most importantly: they have lots of more attributes and methods thats not defined in the DTD because it has nothing to do with the DTD. For example, the class attribute is named className in javascript. 

A select element has a selectedIndex and that is not part of the DTD. Every standard property of an object is specified in the&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Document_Object_Model&quot; title=&quot;Document Object Model&quot; rel=&quot;nofollow&quot;&gt;(DOM)&lt;/a&gt;. It is in this standard that you have the specification for document.getElementByID for example, and everything else that has to do with how you access the document in javascript. &lt;a href=&quot;http://www.w3.org/TR/DOM-Level-2-HTML/html.html&quot; title=&quot;DOM&quot; rel=&quot;nofollow&quot;&gt;Take a look at this&lt;/a&gt; and go down to Interface HTMLTextAreaElement. There you find: &quot;attribute DOMString value;&quot; and for its description: &quot;Represents the current contents of the corresponding form control, in an interactive user agent. Changing this attribute changes the contents of the form control, but does not change the contents of the element.&quot;</description>
		<content:encoded><![CDATA[<p>Gyorgy Fekete: You are referring to the specification for (X)HTML markup, and whats allowed is specified in a <a href="http://en.wikipedia.org/wiki/Document_Type_Definition" title="Document Type Definition" rel="nofollow">also known as DTD</a>. </p>
<p>But that has very little to do with javascript. In javascript each element is defined as an javascript object, and that object usually have the same attributes as defined in the DTD but not always with the same name. And, most importantly: they have lots of more attributes and methods thats not defined in the DTD because it has nothing to do with the DTD. For example, the class attribute is named className in javascript. </p>
<p>A select element has a selectedIndex and that is not part of the DTD. Every standard property of an object is specified in the <a href="http://en.wikipedia.org/wiki/Document_Object_Model" title="Document Object Model" rel="nofollow">(DOM)</a>. It is in this standard that you have the specification for document.getElementByID for example, and everything else that has to do with how you access the document in javascript. <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html" title="DOM" rel="nofollow">Take a look at this</a> and go down to Interface HTMLTextAreaElement. There you find: &#8220;attribute DOMString value;&#8221; and for its description: &#8220;Represents the current contents of the corresponding form control, in an interactive user agent. Changing this attribute changes the contents of the form control, but does not change the contents of the element.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyorgy Fekete</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40195</link>
		<dc:creator>Gyorgy Fekete</dc:creator>
		<pubDate>Tue, 16 Dec 2008 08:58:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40195</guid>
		<description>@some Here it is the &lt;a href=&quot;http://www.devguru.com/technologies/xhtml/quickref/xhtml_textarea.html&quot; rel=&quot;nofollow&quot;&gt;XHTML Transitional textarea tag&lt;/a&gt;

There&#039;s no &lt;em&gt;value&lt;/em&gt; attribute.</description>
		<content:encoded><![CDATA[<p>@some Here it is the <a href="http://www.devguru.com/technologies/xhtml/quickref/xhtml_textarea.html" rel="nofollow">XHTML Transitional textarea tag</a></p>
<p>There&#8217;s no <em>value</em> attribute.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: some</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40189</link>
		<dc:creator>some</dc:creator>
		<pubDate>Tue, 16 Dec 2008 06:47:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40189</guid>
		<description>Gyorgy Fekete: What do you base it on that it in javascript
shouldn&#039;t have that attribute. Give a link to the standard.</description>
		<content:encoded><![CDATA[<p>Gyorgy Fekete: What do you base it on that it in javascript<br />
shouldn&#8217;t have that attribute. Give a link to the standard.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyorgy Fekete</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40183</link>
		<dc:creator>Gyorgy Fekete</dc:creator>
		<pubDate>Tue, 16 Dec 2008 05:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40183</guid>
		<description>FF 3 has a bug, because in XHTML compliant mode the textarea shouldn&#039;t have a value attribute...</description>
		<content:encoded><![CDATA[<p>FF 3 has a bug, because in XHTML compliant mode the textarea shouldn&#8217;t have a value attribute&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland Cozzolino</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40179</link>
		<dc:creator>Roland Cozzolino</dc:creator>
		<pubDate>Tue, 16 Dec 2008 03:30:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40179</guid>
		<description>I am shocked I actually found this blog since I was having the same exact error in FF 3.0.4. To replicate it, all you need to do is create an ajax object and set innerHTML on a textarea. Then click on anything other than the object that fires the ajax call. 

Afterwards, click back on the object which fires an ajax event. At one point I thought I was crazy so I alerted out both the value and the innerHTML of the textarea, and low and behold they were different. So for some reason, FF updates the innerHTML but fails to update the value of the textarea, which is the component it uses to render the text back out to the screen. As a work around, I set both the innerHTML and value fields of the textarea, which resolved my problem. Thanks for this blog posting, it would have driven me crazy!</description>
		<content:encoded><![CDATA[<p>I am shocked I actually found this blog since I was having the same exact error in FF 3.0.4. To replicate it, all you need to do is create an ajax object and set innerHTML on a textarea. Then click on anything other than the object that fires the ajax call. </p>
<p>Afterwards, click back on the object which fires an ajax event. At one point I thought I was crazy so I alerted out both the value and the innerHTML of the textarea, and low and behold they were different. So for some reason, FF updates the innerHTML but fails to update the value of the textarea, which is the component it uses to render the text back out to the screen. As a work around, I set both the innerHTML and value fields of the textarea, which resolved my problem. Thanks for this blog posting, it would have driven me crazy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: some</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40145</link>
		<dc:creator>some</dc:creator>
		<pubDate>Mon, 15 Dec 2008 09:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40145</guid>
		<description>@Gyorgy Fekete: Are you referring to the DTD? Thats for the markup
in the document. But for javascript (ECMAScript) to access the
document you should look in the &lt;a href=
&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html&quot;&gt;
DOM&lt;/a&gt; and there you find for textarea: &quot;value of type DOMString:
Represents the current contents of the corresponding form control,
in an interactive user agent.&quot;</description>
		<content:encoded><![CDATA[<p>@Gyorgy Fekete: Are you referring to the DTD? Thats for the markup<br />
in the document. But for javascript (ECMAScript) to access the<br />
document you should look in the <a href=<br />
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html"><br />
DOM</a> and there you find for textarea: &#8220;value of type DOMString:<br />
Represents the current contents of the corresponding form control,<br />
in an interactive user agent.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyorgy Fekete</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40143</link>
		<dc:creator>Gyorgy Fekete</dc:creator>
		<pubDate>Mon, 15 Dec 2008 07:40:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40143</guid>
		<description>@Some It shouldn&#039;t work, because according to the xHTML specs. the textarea tag shouldn&#039;t have a &lt;em&gt;value&lt;/em&gt; attribute.</description>
		<content:encoded><![CDATA[<p>@Some It shouldn&#8217;t work, because according to the xHTML specs. the textarea tag shouldn&#8217;t have a <em>value</em> attribute.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Some</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-40135</link>
		<dc:creator>Some</dc:creator>
		<pubDate>Mon, 15 Dec 2008 03:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-40135</guid>
		<description>Where have you got the impression that using value on a textarea is wrong? 
Textarea is after all one of the input fields together with select and input, and they all have a value property. For input the value is specified in an attribute, for select it is in an option tag, and for textarea it is in the content of the tag. 

The value is specified in the HTML-markup in different ways, but in javascript it is accessed via a property that has the same name regardless of how it was defined in the HTML-markup. The strange behavior you see with innerHTML on textarea is because of the autocomplete function: Load a page with input, select and textarea elements where each of them have a value. 

Enter text in the input and textarea and choose something from the select box, then refresh the page with F5. Now it doesn&#039;t matter what the server says the value of the fields should be, because the autocomplete feature in the browser has filled in the values you had before you pressed F5.</description>
		<content:encoded><![CDATA[<p>Where have you got the impression that using value on a textarea is wrong?<br />
Textarea is after all one of the input fields together with select and input, and they all have a value property. For input the value is specified in an attribute, for select it is in an option tag, and for textarea it is in the content of the tag. </p>
<p>The value is specified in the HTML-markup in different ways, but in javascript it is accessed via a property that has the same name regardless of how it was defined in the HTML-markup. The strange behavior you see with innerHTML on textarea is because of the autocomplete function: Load a page with input, select and textarea elements where each of them have a value. </p>
<p>Enter text in the input and textarea and choose something from the select box, then refresh the page with F5. Now it doesn&#8217;t matter what the server says the value of the fields should be, because the autocomplete feature in the browser has filled in the values you had before you pressed F5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyorgy Fekete</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-39013</link>
		<dc:creator>Gyorgy Fekete</dc:creator>
		<pubDate>Wed, 12 Nov 2008 18:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-39013</guid>
		<description>I will have the examples soon.  :-D</description>
		<content:encoded><![CDATA[<p>I will have the examples soon.  <img src='http://blog.primalskill.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyorgy Fekete</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-38998</link>
		<dc:creator>Gyorgy Fekete</dc:creator>
		<pubDate>Wed, 12 Nov 2008 13:57:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-38998</guid>
		<description>Interesting post. But if you pass text with innerHTML it should work, but it isn&#039;t working in FF.</description>
		<content:encoded><![CDATA[<p>Interesting post. But if you pass text with innerHTML it should work, but it isn&#8217;t working in FF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://blog.primalskill.com/textarea-with-javascript-bug-in-firefox-2x-and-up/comment-page-1/#comment-38997</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Wed, 12 Nov 2008 13:45:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.primalskill.com/?p=463#comment-38997</guid>
		<description>See:
http://blog.coderlab.us/2005/09/22/using-the-innertext-property-with-firefox/
for a more satisfactory solution.</description>
		<content:encoded><![CDATA[<p>See:<br />
<a href="http://blog.coderlab.us/2005/09/22/using-the-innertext-property-with-firefox/" rel="nofollow">http://blog.coderlab.us/2005/09/22/using-the-innertext-property-with-firefox/</a><br />
for a more satisfactory solution.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

