How do I inject javascript to a page on IE 8?
Lets suppose that I have the following markup: <div id="placeHolder"></div> and I have a JavaScript variable jsVar that contains some markup and some JavaScript. By using Mootools 1.1 I can inject the JavaScript content into the placeholder like this: $('placeHolder').setHTML(jsVar); This works in Firefox, Opera, and even Safari and the resulting markup looks like this: <div id="placeHolder"> <strong>I was injected</strong> <script type="text/javascript"> alert("I was injected too!"); </script> </div> However, on IE 8 I get the following: <div id="placeHolder"> <strong>I was injected</strong>