Click here to Skip to main content
14,267,679 members
Rate this:
Please Sign up or sign in to vote.
See more:
For this piece of code below:
var fso = new ActiveXObject("Scripting.FileSystemObject"); 

JavaScript runtime error: Automation server can't create object
In my IE Tools' security setting, I did Enable the Initialize and script Activex controls not marked as safe for script option.

How can this problem be eliminated? Thanks.
Updated 12-Jan-16 9:17am
ZurdoDev 12-Jan-16 16:29pm
FYI, this code will only work in IE, not chrome or firefox, and will only work when you lower the security level enough.
DeDenker 13-Jan-16 5:57am
This code suggest you want to access the local drive, big change the webserver is not allowing this.
Unless this is internal use like a webbased file explorer, no body in there right mind will allow this to run on there computer.

What are you trying to accomplish?
s yu 13-Jan-16 6:46am
JK and Ryan: Thanks to both of you for your responses. In my project, I need to upload some files into a shared folder in server using FileLoad in an aspx file. This is my JS version to check if the file exists. Since it is security-sensitive, I might to consider something alternative. Thanks again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100