title: Flask not executing Javascript in static directory
body: <p><strong>Overview</strong>: I am using Ubuntu 14.04 in virtualbox, running the Python based Flask module to host a local portal with html, javascript, jquery and php elements. </p>
  
  <p><strong>Expected Outcome</strong>: I have a static JS file called test.js that I expect to be served when the template portal.html loads. </p>
  
  <p><strong>Issue</strong>: The HTML page loads correctly, I receive a GET status 200 for test.js in the terminal, however the JS script does not execute (i.e. 'Twitter' is not present in the tags with id="screen_name"). I checked localhost:5000/static/js/test.js and the script is present. I tried including the exact same JS script directly in the HTML rather than as a static file and it worked fine. </p>
  
  <p><strong>Question</strong>: If my static JS script in being requested why is it not executing?</p>
  
  <p><strong>Directory Structure</strong>:</p>
  
  <pre><code>portal
      - portal_server.py
      - templates
          - portal.html
      - static
          - img
          - css
          - js
              - test.js
  </code></pre>
  
  <p><strong>Contents of test.js</strong>:</p>
  
  <pre><code>var x = document.getElementById('screen_name');
  x.textContent = 'twitter';
  </code></pre>
  
  <p><strong>Relevant element of HTML</strong>:</p>
  
  <pre><code>&lt;h3 id="screen_name"&gt;&lt;/h3&gt;
  </code></pre>
  
  <p><strong>Script element of HTML</strong>:</p>
  
  <pre><code>&lt;script src="{{ url_for('static', filename='js/test.js') }}"&gt;&lt;/script&gt;
  </code></pre>