<?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 Character Count</title> <atom:link href="http://www.elanman.co.uk/2008/08/textarea-character-count/feed/" rel="self" type="application/rss+xml" /><link>http://www.elanman.co.uk/2008/08/textarea-character-count/</link> <description>ElanMan&#039;s Code Snippets</description> <lastBuildDate>Wed, 18 Jan 2012 12:55:26 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: ElanMan</title><link>http://www.elanman.co.uk/2008/08/textarea-character-count/comment-page-1/#comment-140</link> <dc:creator>ElanMan</dc:creator> <pubDate>Thu, 15 Oct 2009 10:55:25 +0000</pubDate> <guid
isPermaLink="false">http://www.elanman.co.uk/?p=57#comment-140</guid> <description>Ah, good spot Iain :)
I needed to change this line
&lt;pre lang=&quot;javascript&quot;&gt;
function charLimit(el) {
if (el.value.length == maxLength) return false;
return true;
}
&lt;/pre&gt;
to this:
&lt;pre lang=&quot;javascript&quot;&gt;
function charLimit(el) {
if (el.value.length &gt; maxLength) return false;
return true;
}
&lt;/pre&gt;
I&#039;ve amended the code in the post.
It should work fine now :)</description> <content:encoded><![CDATA[<p>Ah, good spot Iain <img
src='http://www.elanman.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br
/> I needed to change this line</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> charLimit<span style="color: #009900;">&#40;</span>el<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>el.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> maxLength<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>to this:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> charLimit<span style="color: #009900;">&#40;</span>el<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>el.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> maxLength<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>I&#8217;ve amended the code in the post.<br
/> It should work fine now <img
src='http://www.elanman.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Iain</title><link>http://www.elanman.co.uk/2008/08/textarea-character-count/comment-page-1/#comment-139</link> <dc:creator>Iain</dc:creator> <pubDate>Thu, 15 Oct 2009 08:03:33 +0000</pubDate> <guid
isPermaLink="false">http://www.elanman.co.uk/?p=57#comment-139</guid> <description>Once the char count has been hit, backspace/Delete is no longer allowed.</description> <content:encoded><![CDATA[<p>Once the char count has been hit, backspace/Delete is no longer allowed.</p> ]]></content:encoded> </item> </channel> </rss>
