title: javascript function call not working
body: <p>Inside register.js I have a function called username() and I want to call it from my webpage but the function will not run.</p>
  
  <p>Here is where I include the .js file and call the function: </p>
  
  <pre><code>&lt;head&gt;
          &lt;link rel="stylesheet" href="css/base.css" /&gt;
          &lt;script src="resources/jquery-1.8.1.min.js"&gt;&lt;/script&gt;
          &lt;script src="resources/register.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;username();&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>This is in the .js file:</p>
  
  <pre><code>function username(){
      document.getElementById("username").innerHTML="Username already in use";
  }
  </code></pre>