I am trying to create a text file using JavaScript. I have tried the following code, but this didn’t work. What is the solution?
var fso, file;
fso = new ActiveXObject("Scripting.FileSystemObject");
file = fso.CreateTextFile("c:\\Mytest\test.txt");
file.Close();
You cannot do it using ActiveXObject as it works only in Internet Explorer... Have a look on File System APIs of HTML5 which may help you.