I have a problem with inline vs included Javascript
<p>I am relatively new to javascript and am trying to understand how to use it correctly.
If I wrap js code in an anonymous function to avoid making variables public the functions within the js are not available from within the html that includes the js. On initially loading the page the js loads and is executed but on subsequent reloads of the page the js code does not go through the execution process again. Specifically there is an ajax call using httprequest to get dat from a php file and passes the returned data to a callback function that in onsuccess processes the data, if I could call the function that does the httprequest from within the html in a  block on each page load I'd be all set - as it is I have to inject the entire js code into that block to get it to work on page load, hoping someone can educate me</p>
