Firing onload property when .js file is inserted dynamically
<p>I fire my javascript using the onload property -> <code>window.onload = function(){ // start code }</code></p>

<p>Rececently I started doing an .innerHTML write to the <code>&lt;head&gt;</code> tag which sets my .js file.</p>

<p><code>document.head.innerHTML = html_string</code> </p>

<pre><code>// where html_string contains the link to my .js file.
</code></pre>

<p>Problem I'm having is that now the onload function is never called so my page has no javascript on it.</p>

<p>Is there a way to manually call it or emulate its behavior?</p>
