Get element issue with IE

Hi,

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?


<script>
<!--
   function getSaleInfo() {
     document.getElementById('st_code').innerHTML='<iframe src="http://domain.com/affiliate/salejs.php?amount=15&transaction=B" alt="" width=400 height=400>';
 }
 window.onload = getSaleInfo;
 // -->
 </script>
 <div id="st_code" style="visibility:hidden"></div>

Thanks.

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.

Thanks.

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 http://domain.com in the example.