title: executing javascript function from HTML without event
body: <p>I wish to call a javascript function from an HTML page and I <strong>do not</strong> want it dependent on any event.  The function is in a separate .js file since I wish to use it from many web pages. I am also passing variables to it.  I've tried this:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;script type="text/javascript" src="fp_footer2.js"&gt;
  footerFunction(1_basic_web_page_with_links, 1bwpwl.html);
  &lt;/script&gt;    
  </code></pre>
  
  <p>The function in fp_footer2.js:</p>
  
  <pre><code>function footerFunction(path, file) {
  
  document.write("&lt;a href=" + path + "/" + file + " target='_blank'&gt;Link to the original web page for this assignment.&lt;/a&gt;");
  
  return;
  }
  </code></pre>
  
  <p>(I have also tried putting the fp_footer2.js file reference in the header, to no avail.  I'm not sure if I can put it 'inline' like I did in this example. If not, please let me know.</p>
  
  <p>PS: I know I can do this with a simple 'a href=""' in the HTML itself.  I wanted to see if this could work, for my own curiosity.</p>