Uncaught TypeError: Cannot read property 'myselect' of undefined (anonymous function)
<p>I have a select box element with id <code>myselect</code>.  The select box is in a form called <code>myform</code>.  I am sure it is in this form because printing this before where my error is happening prints the correct form:</p>

<pre><code>&gt;&gt; console.log(document.forms[0].id);
   myform
</code></pre>

<p>I get the error:</p>

<pre><code>Uncaught TypeError: Cannot read property 'myselect' of undefined (anonymous function)
</code></pre>

<p>where I do this: </p>

<pre><code>document.myform.myselect
</code></pre>

<p>Any ideas why?</p>

<p>Thank you :).</p>
