jquery.val() on the page works, off the page does not? Why?
<p>I had the following: </p>

<pre><code>&lt;script type="text/javascript"&gt;
var noteid = $('#noteid').val();
&lt;/script&gt;
&lt;input type="hidden" name="noteid" id="noteid" value="321"&gt;
</code></pre>

<p>This works great... but now I'm trying to move the JavaScript off the page into a linked JS file like so: </p>

<pre><code>&lt;script type="text/javascript" src="/js/note_beta.js"&gt; &lt;/script&gt;
&lt;input type="hidden" name="noteid" id="noteid" value="321"&gt;
</code></pre>

<p>This ext JS file has the code: "var noteid = $('#noteid').val();" but it isn't working... Is there a trick to getting this to work when it isn't on the page itself?</p>

<p>Thanks</p>
