title: How to run a Javascript function after a specific JS has loaded?
body: <p>I have made a js function for including another Javascript in my html. I need to make sure that the script I have loaded using the function is has completed processing and then only move further in my original script.</p>
  <pre><code>function loadBackupScript(){
      var script = document.createElement('script');
      script.src = 'http://www.geoplugin.net/javascript.gp';
      script.type = 'text/javascript';
      var head = document.getElementsByTagName(&quot;head&quot;)[0];
      head.appendChild(script);
  }
  </code></pre>
  <p>I need to know that the script has loaded to use its functions ahead. How do I do that?</p>