title: Unable to run JavaScript in external file in Microsoft Edge browser
body: <p>I'm trying to get a piece of JavaScript to run using Microsoft Edge, but it does not run when the JavaScript code is held in an external .js file.  No errors are returned, and all I can readily get from the debugger is that the function does not exist.  The code works perfectly well in IE 11, Chrome 45 and Firefox 39.  The JavaScript embedded in the HTML page itself always works fine.</p>
  
  <p>Can someone give me a steer as to what I am doing wrong?</p>
  
  <p>The HTML file is called hjt01.htm and the external JavaScript is hjt01.js (in the same directory as </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function externalbox()
  {
   alert("Clicked!")
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE HTML&gt;
  &lt;!-- saved from url=(0014)about:internet --&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
  &lt;meta name="GENERATOR" content="Description of page"&gt;
  &lt;meta http-equiv="pragma" content="no-cache"&gt;
  &lt;title&gt;Webpage Title&lt;/title&gt;
  &lt;meta name="description" content="Description of page"&gt;
  &lt;script language="javascript" type="text/javascript" src="hjt01.js"&gt;&lt;/script&gt;
  &lt;script language="javascript" type="text/javascript"&gt;
  function internalbox()
  {
   alert("Clicked!")
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body id="pagedetail"&gt;
  &lt;a href="javascript:externalbox();"&gt;External&lt;/a&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;a href="javascript:internalbox();"&gt;Internal&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've searched the Web but can't find any relevant information.  I have tried setting the "Edit JavaScript" setting to Enabled in Edge's F12 Developers Tools, but this has made no difference.</p>
  
  <p>I have version 20.10240.16384.0 of Edge.</p>