title: Uncaught ReferenceError when accessing an object from another JS file
body: <p>I have various JS libraries in my web application, which are loaded before my main JS file (main.js). One of these libraries is <a href="http://www.timdown.co.uk/jshashtable/" rel="nofollow">jshashtable</a>, but when I try to create a new Hashtable object in main.js, Google Chrome and Firefox throw a ReferenceError, complaining that the variable does not exist.</p>
  
  <p>Here is the &lt;head> of the application:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" src="/static/jquery-1.4.4.min.js"&gt;&lt;/script&gt;
   &lt;script type="text/javacsript" src="/static/jshashtable-2.1.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" src="/static/main.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Here is the problem line in main.js:</p>
  
  <pre><code>posts = new Hashtable();
  </code></pre>
  
  <p>This line is inside a function called <code>init</code> which is called when the page has finished loading (using the jquery $(document).ready() function).</p>
  
  <p>Any reason why Hashtable is not global? Google maps and jquery objects work with no such problem. The source of jshashtable can be seen on <a href="http://code.google.com/p/jshashtable/source/browse/trunk/hashtable.js" rel="nofollow">Google code</a>.</p>