Get element issue with IE


This function is not working in IE but seems to work in Firefox and the other browsers. How can I get this to work in IE?

   function getSaleInfo() {
     document.getElementById('st_code').innerHTML='<iframe src="" alt="" width=400 height=400>';
 window.onload = getSaleInfo;
 // -->
 <div id="st_code" style="visibility:hidden"></div>


Get rid of the SGML comments (<!-- and // –>) and put this in an external script.

What exactly is “not working”?

I got rid of the comments and it still did not work, so you said put in an external script, so I cannot have it like I have it above? Please explain in detail what part I need to move to an external script. Sorry I am a newbi.


also note the code above worked in other browsers just not IE, so does it need to be different to work in IE. This code should be calling what I have as in the example.