My textarea is not working? it stores the data but the count is not working
<p>Please can you help with the query below, I am trying to setup a textarea count and it doesn seem to work, I have tried it in Another page and it works fine</p>

<p>code below</p>

<pre><code>&lt;td width="138" height="95" align="left" class="style31" &gt;Case Notes&lt;/td&gt;
      &lt;td width="214"  align="left"&gt;     

&lt;textarea name="notes" id="limitedtextarea"  onKeyDown="limitText(this.form.limitedtextarea,this.form.countdown,255);" 
onKeyUp="limitText(this.form.limitedtextarea,this.form.countdown,255);"&gt;&lt;?php if(isset($rec2['notes']) &amp;&amp; $rec2['notes']!='') echo stripslashes($rec2['notes']); ?&gt;
&lt;/textarea&gt;&lt;br&gt;
&lt;font size="1"&gt;(Maximum characters: 255)&lt;br&gt;
You have &lt;input readonly type="text" name="countdown" size="3" value="255"&gt; characters left.&lt;/font&gt;&lt;/td&gt;








&lt;/script&gt;

&lt;script language="javascript" type="text/javascript"&gt;
function limitText(limitField, limitCount, limitNum) {
    if (limitField.value.length &gt; limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } else {
        limitCount.value = limitNum - limitField.value.length;
    }
}
&lt;/script&gt;
</code></pre>
