title: Internet explorer global javascript files
body: <p>I am building a PHP MVC website and I include several js files..
  The problem I encounter is that if I have for example a js file containing functions and needed variables I can't use them in other js files (I call the functions using <code>document.ready()</code> and I use mostly jQuery to make ajax calls). It works fine in Firefox but IE throws an error...
  I include the js files using a html class:</p>
  
  <pre><code>function includeJs($fileName) {
      $data = '&lt;script src="'.BASE_PATH.'/public/js/'.$fileName.'.js" type="text/javascript"&gt;&lt;/script&gt;';
      return $data;
  }
  </code></pre>
  
  <p>This is the error I'm getting:</p>
  
  <pre>
  Webpage error details
  User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;
              SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729;
              Media Center PC 6.0; InfoPath.3; .NET CLR 1.1.4322)
              Timestamp: Thu, 3 Mar 2011 11:53:33 UTC
  
  Message: Expected identifier Line: 26 Char: 21 Code: 0
           URI: http://localhost/learning/public/js/general.js
  Message: Object expected Line: 5 Char: 3 Code: 0
           URI: http://localhost/learning/public/js/tests.js
  </pre>