title: OnKeyUp,OnKeyDown and onKeyPress
body: <p>I try to use all here in this combination:</p>
  
  <pre><code>&lt;SCRIPT LANGUAGE="JavaScript"&gt;
  
   function CountLeft(field, count, max) 
   {
       if (field.value.length &gt; max)
           field.value = field.value.substring(0, max);
       else
           count.value = max - field.value.length;
   }
  
  &lt;/SCRIPT&gt;
  &lt;input name="text" onKeyDown="CountLeft(this.form.text, this.form.left,50);"
                     onKeyUp="CountLeft(this.form.text,this.form.left,50);"  onKeyPress="return entsub(event)"&gt;
  
  
  &lt;input readonly type="text" name="left" size=3 maxlength=3 value="50"&gt;  
  characters left
  </code></pre>
  
  <p>But the enter key to submit does not work here, can anyone tell me how I can fix that? 
  Oh and, I am trying to make a counter here.</p>
  
  <p>Thanks!</p>