title: How do I inject javascript to a page on IE 8?
body: <p>Lets suppose that I have the following markup:</p>
  
  <pre><code>&lt;div id="placeHolder"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and I have a JavaScript variable <code>jsVar</code> that contains some markup and some JavaScript.</p>
  
  <p>By using Mootools 1.1 I can inject the JavaScript content into the placeholder like this:</p>
  
  <pre><code>$('placeHolder').setHTML(jsVar);
  </code></pre>
  
  <p>This works in Firefox, Opera, and even Safari and the resulting markup looks like this:</p>
  
  <pre><code>&lt;div id="placeHolder"&gt;
      &lt;strong&gt;I was injected&lt;/strong&gt;
      &lt;script type="text/javascript"&gt;
          alert("I was injected too!");
      &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However, on IE 8 I get the following:</p>
  
  <pre><code>&lt;div id="placeHolder"&gt;
      &lt;strong&gt;I was injected&lt;/strong&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Is there any way to inject the JavaScript on IE 8 or does it security model forbid me from doing this at all?</p>
  
  <p>I tried Luca Matteis' suggestion of using </p>
  
  <pre><code>document.getElementById("placeHolder").innerHTML = jsVar;
  </code></pre>
  
  <p>instead of the MooTools code and I get the same result. This is not a MooTools issue.</p>