title: .Net MVC, how to call Javascript function in external Javascript file from partial view
body: <p>I have a Partial view that I want to call a jQuery function that resides in an external Javascript file.  I know partial views can possibly rendered multiple times on a parent view, I am OK with this.  For our case the partial view only renders once in any case.  I call the external Javascript file reference in the parent of the Partial View.</p>
  
  <p>I have an external Javascript file 'global.js' with a function in it.</p>
  
  <pre><code>  //function in global.js
    function myFunction(){alert("hello");}
  </code></pre>
  
  <p>In my partial view I have a script tag that I want to call the "myFunction" function in the global.js file.</p>
  
  <pre><code>   &lt;script&gt;myFunction();&lt;/script&gt;
  </code></pre>
  
  <p>Should be pretty standard stuff, but when I try to call "myFunction()" from the partial view in my Chrome Developer Console, I get that myFunction() is not defined.  Like I mentioned, it is called in the parent of the partial view, but it seems the Partial View doesn't have any idea the external Javascript file exists.</p>
  
  <p>Any recommendations?</p>