Trying to load advertiser script tags asynchronously - not working
<p>I've got some banner zones set up on advertisespace.com - I'm trying to load the script tags using jquery so they load after the page has loaded. However its not working. Here is my code to do this.</p>

<p>Here is the function I use to include the script tag:</p>

<pre><code>function jsinclude(file, dom) {
   if (document.createElement &amp;&amp; document.getElementsByTagName) {
     if(dom=='undefined')
        var dom = document.getElementsByTagName('head')[0];

     var script = document.createElement('script');
     script.setAttribute('type', 'text/javascript');
     script.setAttribute('src', file);

     script.setAttribute('charset',"utf-8");

     dom.appendChild(script);
   } else {
     alert('Your browser can\'t deal with the DOM standard. That means it\'s old. Go fix it!');
   }
 }
</code></pre>

<p>ANd here is how I am calling the function:</p>

<pre><code>$(function(){
jsinclude('http://ads.advertisespace.com/somethingsomething.js', document.getElementById('location-of-banner-1'));


jsinclude('http://ads.advertisespace.com/somethingsomething.js', document.getElementById('location-of-banner-2'));

})
</code></pre>

<p>The result is that the script tag is inserted in the correct place but the banners doesn't show i.e the code in the script file referred to is never executed. How can I fix this.</p>
