<?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"
	>
<channel>
	<title>Comments on: Useful JavaScript: textCounter</title>
	<atom:link href="http://www.nullislove.com/2008/05/23/useful-javascript-textcounter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nullislove.com/2008/05/23/useful-javascript-textcounter/</link>
	<description>Code for Coders</description>
	<pubDate>Thu, 20 Nov 2008 18:32:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: swordsmen2</title>
		<link>http://www.nullislove.com/2008/05/23/useful-javascript-textcounter/#comment-1147</link>
		<dc:creator>swordsmen2</dc:creator>
		<pubDate>Wed, 28 May 2008 15:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/?p=265#comment-1147</guid>
		<description>You might want to ignore spaces or tabs.
&lt;pre&gt;
	// Count the spaces, so that you can adjust the values to not include them.
	// 	var spaces = field.value.replace(/[^ ]/g, '').length;
	// Also "ignore" tab characters
	// 	var spaces = field.value.replace(/[^\s]/g, '').length;

	// function parameters are:
	// field - the string field
	// countfield - the field for remaining characters number and 
	// maxlimit - the maximum number of characters  
	function CountLeft(field, countfield, maxlimit) {
		var spaces = field.value.replace(/[^\s]/g, '').length;
		if (field.value.length - spaces &#62; maxlimit) {
			field.value = field.value.substring(0, maxlimit + spaces);
		} else {
			countfield.value = maxlimit - (field.value.length - spaces);
		}
	}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You might want to ignore spaces or tabs.</p>
<pre>
	// Count the spaces, so that you can adjust the values to not include them.
	// 	var spaces = field.value.replace(/[^ ]/g, &#8221;).length;
	// Also &#8220;ignore&#8221; tab characters
	// 	var spaces = field.value.replace(/[^\s]/g, &#8221;).length;

	// function parameters are:
	// field - the string field
	// countfield - the field for remaining characters number and
	// maxlimit - the maximum number of characters
	function CountLeft(field, countfield, maxlimit) {
		var spaces = field.value.replace(/[^\s]/g, &#8221;).length;
		if (field.value.length - spaces &gt; maxlimit) {
			field.value = field.value.substring(0, maxlimit + spaces);
		} else {
			countfield.value = maxlimit - (field.value.length - spaces);
		}
	}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Fresh Cup &#187; Blog Archive &#187; Double Shot #215</title>
		<link>http://www.nullislove.com/2008/05/23/useful-javascript-textcounter/#comment-1143</link>
		<dc:creator>A Fresh Cup &#187; Blog Archive &#187; Double Shot #215</dc:creator>
		<pubDate>Mon, 26 May 2008 10:18:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/?p=265#comment-1143</guid>
		<description>[...] Useful JavaScript: textCounter - Show the number of characters remaining in a text input. Where was this when I needed it? [...]</description>
		<content:encoded><![CDATA[<p>[...] Useful JavaScript: textCounter - Show the number of characters remaining in a text input. Where was this when I needed it? [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
