I am currently using javascript to enable changes to css on hover for certain items in my html page. In Firefox I never get an ActiveX message but in IE8 I get a message stating "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer. Click here for options..." I'm assuming its because of the javascript I have:
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
The hover effects still work in IE8 without me clicking on the warning and allowing ActiveX.
My questions are: 1) Is there a way for me to change the javascript I have in place for the hover effects so the ActiveX warning doesn't pop up? 2) Is there code to disable the ActiveX warning since the website works fine in IE even with the warning?
Thank you
You can try this if it work :
Add this to your ASPX code.
That's the default security restriction when you open it by local disk file system instead of by webserver. In other words, it won't occur when you change the security restrictions in the browser configuration or serve it by a (local) webserver like http://localhost/test.html
ActiveX is MSIE proprietary, you indeed won't ever see this on browsers other than MSIE.
It happens only when you work with local files, if it still bothers you, check this out: http://msdn.microsoft.com/en-us/library/ms537628(VS.85).aspx