views:

12

answers:

2

I'm making a snippet that people can add to their web sites. My problem is that it invokes the yellow "ActiveX" bar at the top in Internet explorer. I'm not sure what invokes it. This is my code:

<a id="nhl1" href="http://www.theaddress.com/"&gt;link&lt;/a&gt;
<script type="text/javascript"> 
(function () { document.getElementById('nhl1').innerHTML = 
'<img src="http://www.theaddress.com/banner1.jpg" alt="image 1" style="border: none;" />'; })(); 
</script>
+2  A: 

If you're running the page in the local machine, this will happen when there is a script on the page. The actual message is:

To help protext your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer. Click here for options...

[emphasis mine]

If you run the same page on a webserver, you will not see the yellow warning bar.

Andy E
A: 

Am getting similar error in page running in live site.. what can i do to prevent this?

chi