title: How do I Inject Javascript with Firefox Extension
body: <p>I am building a Firefox extension and have come a long way.  One of the parts of my extension is where I display a DIV at the bottom of the page and I want to put an ad into the div, but for some reason every time it does so, it redirects to another page entirely with the ad on it. So it looks like its not allowing me to insert this code below into the div that sits at the bottom.  Any chance anyone can help?</p>
  
  <p>This code of course calls the "ad_display.js" file and thats where it does the redirect.  Any way I can do this or am I stuck in the water?</p>
  
  <p>Thanks!!!</p>
  
  <pre><code>    &lt;!-- Beginning of Project Wonderful ad code: --&gt;
  &lt;!-- Ad box ID: 38154 --&gt;
  &lt;script type="text/javascript"&gt;
  &lt;!--
  var pw_d=document;
  pw_d.projectwonderful_adbox_id = "38154";
  pw_d.projectwonderful_adbox_type = "2";
  pw_d.projectwonderful_foreground_color = "";
  pw_d.projectwonderful_background_color = "";
  //--&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="http://www.projectwonderful.com/ad_display.js"&gt;&lt;/script&gt;
  &lt;!-- End of Project Wonderful ad code. --&gt;
  </code></pre>