Adding src attribute to <script>
<p>I have this: </p>

<pre><code>script_url = 'http://externaldomain.com/script.js'
div_id = 'div'+Math.floor(Math.random() * 1000000);
document.write('&lt;div id="'+div_id+'"&gt;&lt;scr'+'ipt id="banner-to-load"&gt;&lt;/scr'+'ipt&gt;&lt;/div&gt;')
</code></pre>

<p>After DOM is ready i do this: </p>

<pre><code>$('#banner-to-load').attr('src',script_url)
</code></pre>

<p>Now, <code>script_url</code> appended, but nothing happens. External script has some functions and <code>document.write</code>, but they don't work. How can i run external script? Or if i run it <code>document.write</code> inside will rebuild my already compiled DOM?</p>
