admin管理员组文章数量:1317909
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 puter. 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
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 puter. 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
Share Improve this question asked Oct 24, 2010 at 3:27 EverTheLearnerEverTheLearner 7,21016 gold badges59 silver badges73 bronze badges3 Answers
Reset to default 3That'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
In Firefox I never get an ActiveX message
ActiveX is MSIE proprietary, you indeed won't ever see this on browsers other than MSIE.
You can try this if it work :
Add this to your ASPX code.
<!doctype html>
<!-- saved from url=(0023)http://www.contoso./ -->
It happens only when you work with local files, if it still bothers you, check this out: http://msdn.microsoft./en-us/library/ms537628(VS.85).aspx
本文标签: javascriptHow do you avoid the dropdown ActiveX warning in IE7 and IE8Stack Overflow
版权声明:本文标题:javascript - How do you avoid the drop-down ActiveX warning in IE7 and IE8? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742028280a2415965.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论