Error when trying to refer to a field by name
<p>I am getting an error (<code>document.my_formm.fieldName.value is null or not an object</code>) from the below code:</p>

<pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;(Type a title for your page here)&lt;/title&gt;

    &lt;script language=JavaScript&gt;
    function check_length(my_formm,fieldName)
    {
      alert(fieldName);
      alert(document.my_formm.fieldName.value);
    }
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;form name=my_form method=post&gt;
      &lt;input type="text" onChange=check_length("my_form","my_text"); name=my_text rows=4 cols=30 value=""&gt;
      &lt;br&gt;
      &lt;input size=1 value=50 name=text_num&gt; Characters Left
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt; 
</code></pre>
