title: Passing Variables to External Javascript
body: <p>I have a view dynamic variables that I would like to pass to an external javascript.</p>
  
  <p>in the HTML I am setting a few hidden input fields, as such:</p>
  
  <pre><code>&lt;input type=hidden id="varID" value="sourceID"&gt;
  </code></pre>
  
  <p>and then calling them in my external Javascript file as such:</p>
  
  <pre><code>varID = document.getElementById("varID").value;
  </code></pre>
  
  <p>When I check to see if there is anything in there, I always get an undefined.  In my HTML, I am setting the hidden input field before I even al to load the external javascript file.</p>
  
  <p>Any ideas of what I'm missing?</p>