“var f = new ActiveXObject('Scripting.FileSystemObject');” not working with IE8

自古美人都是妖i 提交于 2019-12-02 08:14:10

问题


I am very new in using ActiveX controll through java script,

I write var f = new ActiveXObject('Scripting.FileSystemObject'); in my code and Its was working fine on IE6, but recently I upgraded my IE6 to IE8 and what I found now its not working on IE8, returning the error given below:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; MS-RTC LM 8; .NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Timestamp: Wed, 31 Aug 2011 14:23:40 UTC

Message: Automation server can't create object
Line: 735
Char: 9
Code: 0
URI: http://localhost:8080/

qocweb/script/main/MainLetter.js

I googled this and found there is something missing in the IE ActiveX setting and got resolved this problem, But now I have a requirement that it should be solved without playing with IE8 setting.

Can anyone have any idea about this, any suggestion would be really appreciable...


回答1:


You can not use this component with default security settings due to security reasons. Read this for more information.



来源:https://stackoverflow.com/questions/7258491/var-f-new-activexobjectscripting-filesystemobject-not-working-with-ie8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!