<?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: Javascript textarea counter</title>
	<atom:link href="http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/feed/" rel="self" type="application/rss+xml" />
	<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/</link>
	<description>What if Gregor Samsa awoke a computer programmer?</description>
	<lastBuildDate>Tue, 15 May 2012 14:43:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Thomas</title>
		<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/comment-page-1/#comment-9779</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Fri, 25 Dec 2009 14:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=109#comment-9779</guid>
		<description>Could you suggest something that would return character count for special characters which are multibyte and newline and carriage return too.</description>
		<content:encoded><![CDATA[<p>Could you suggest something that would return character count for special characters which are multibyte and newline and carriage return too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Herdt</title>
		<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/comment-page-1/#comment-8359</link>
		<dc:creator>Chris Herdt</dc:creator>
		<pubDate>Tue, 22 Sep 2009 18:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=109#comment-8359</guid>
		<description>Andi, your plugin works well and the Javascript is concise. This is a great solution for people who are looking for an easy-to-implement textarea counter.</description>
		<content:encoded><![CDATA[<p>Andi, your plugin works well and the Javascript is concise. This is a great solution for people who are looking for an easy-to-implement textarea counter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andi</title>
		<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/comment-page-1/#comment-8357</link>
		<dc:creator>Andi</dc:creator>
		<pubDate>Tue, 22 Sep 2009 17:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=109#comment-8357</guid>
		<description>You just inspired me to create a jQuery plugin with the specifications you recommended.  I didn&#039;t do anything about the Enter key counting as 2 characters, though - I agree that it would be confusing to users.

http://dowhatyouwish.com/jquery/charCounter/</description>
		<content:encoded><![CDATA[<p>You just inspired me to create a jQuery plugin with the specifications you recommended.  I didn&#8217;t do anything about the Enter key counting as 2 characters, though &#8211; I agree that it would be confusing to users.</p>
<p><a href="http://dowhatyouwish.com/jquery/charCounter/" rel="nofollow">http://dowhatyouwish.com/jquery/charCounter/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Herdt</title>
		<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/comment-page-1/#comment-7187</link>
		<dc:creator>Chris Herdt</dc:creator>
		<pubDate>Thu, 27 Aug 2009 01:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=109#comment-7187</guid>
		<description>I currently use Javascript to convert all LFs to CRLFs for counting. (Actually, I convert all CRLFs to LFs, all remain CRs to LFs, and then all LFs to CRLFs.) I haven&#039;t noticed that  it slows down data entry, although perhaps I just haven&#039;t noticed. How much of a lag are you seeing?

I do think it may be a little confusing to users that pressing the enter key counts as 2 characters. I suppose I could convert them all to LFs and insert them into the database that way.</description>
		<content:encoded><![CDATA[<p>I currently use Javascript to convert all LFs to CRLFs for counting. (Actually, I convert all CRLFs to LFs, all remain CRs to LFs, and then all LFs to CRLFs.) I haven&#8217;t noticed that  it slows down data entry, although perhaps I just haven&#8217;t noticed. How much of a lag are you seeing?</p>
<p>I do think it may be a little confusing to users that pressing the enter key counts as 2 characters. I suppose I could convert them all to LFs and insert them into the database that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Farnham</title>
		<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/comment-page-1/#comment-7173</link>
		<dc:creator>Mike Farnham</dc:creator>
		<pubDate>Wed, 26 Aug 2009 21:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=109#comment-7173</guid>
		<description>Hi,

I display a counter which counts the characters as the text is entered. 

However, the problem comes in when the Textarea data is actually saved to a database field. Then, when the data is re-displayed, after a successful save, the character counter is now wrong because of the newline characters. 

I thought about trying to include the newline characters in the count, but the initial try slowed down data entry considerably.

My next idea is to deal with them when the form is submitted using javascript. 

Anybody actually saving the data and from the Textarea and showing the person who did the data entry the character count after saving. (Most of the uses I&#039;ve seen for character counters are fire-and-forget with no edit option.)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I display a counter which counts the characters as the text is entered. </p>
<p>However, the problem comes in when the Textarea data is actually saved to a database field. Then, when the data is re-displayed, after a successful save, the character counter is now wrong because of the newline characters. </p>
<p>I thought about trying to include the newline characters in the count, but the initial try slowed down data entry considerably.</p>
<p>My next idea is to deal with them when the form is submitted using javascript. </p>
<p>Anybody actually saving the data and from the Textarea and showing the person who did the data entry the character count after saving. (Most of the uses I&#8217;ve seen for character counters are fire-and-forget with no edit option.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/comment-page-1/#comment-6728</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Wed, 19 Aug 2009 21:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=109#comment-6728</guid>
		<description>i like this.
It is intresting. I like the last one. I wish i could download it and stuff..</description>
		<content:encoded><![CDATA[<p>i like this.<br />
It is intresting. I like the last one. I wish i could download it and stuff..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Herdt</title>
		<link>http://osric.com/chris/accidental-developer/2008/11/javascript-textarea-counter/comment-page-1/#comment-786</link>
		<dc:creator>Chris Herdt</dc:creator>
		<pubDate>Sun, 16 Nov 2008 01:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=109#comment-786</guid>
		<description>I just found a recent script that &lt;em&gt;mostly&lt;/em&gt; does what I think it should: &lt;a href=&quot;http://www.codefromjames.com/wordpress/?p=15&quot; rel=&quot;nofollow&quot;&gt;Easy Text Area Character Counter with Javascript&lt;/a&gt;.

The main drawback of this approach, I think, is its abuse of HTML standards. The textarea element has no maxlength attribute in HTML 4 (although you could probably extend XHTML to include such an attribute). Likewise, I don&#039;t like the misuse of the label element as the container for the counter.

The example brings up another good point, though: if several textareas (with counters) are present, it could be confusing as to which counter belongs with which textarea. This may be best addressed with CSS (or a combination of CSS and Javascript &#8211; perhaps the current textarea and counter should be highlighted).</description>
		<content:encoded><![CDATA[<p>I just found a recent script that <em>mostly</em> does what I think it should: <a href="http://www.codefromjames.com/wordpress/?p=15" rel="nofollow">Easy Text Area Character Counter with Javascript</a>.</p>
<p>The main drawback of this approach, I think, is its abuse of HTML standards. The textarea element has no maxlength attribute in HTML 4 (although you could probably extend XHTML to include such an attribute). Likewise, I don&#8217;t like the misuse of the label element as the container for the counter.</p>
<p>The example brings up another good point, though: if several textareas (with counters) are present, it could be confusing as to which counter belongs with which textarea. This may be best addressed with CSS (or a combination of CSS and Javascript &ndash; perhaps the current textarea and counter should be highlighted).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

