title: Calling JavaScript function loaded from remote file
body: <p>I am just getting started with HTML/JavaScript, and I have a simple question.  I am attempting to call a js function from a separate script source, but am having a bit of trouble. My function script (date_button_function.js) reads:</p>
  
  <pre><code>function displayDate()
  {
      document.getElementById("date").innerHTML=Date();
  }
  </code></pre>
  
  <p>In order to call on this function, my code looks like this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="date_button_functoin.js"&gt;&lt;/script&gt;
  &lt;body&gt;
  &lt;h1&gt;Testing the Date&lt;/h1&gt;
  &lt;p id="date"&gt;Click below to see the date.&lt;/p&gt;
  &lt;button type="button" onclick="displayDate()"&gt;Display Date&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>When I actually write out the <code>displayDate</code> function in the HTML script, it runs just fine. However, when calling the function, it does not work.  If someone could let me know my syntax error, that would be great.</p>