How can I write a file to the client with JavaScript? - 01.30.02

John Zukowski

 

 

Basic security doesn't permit you to do this but, it possible to instantiate the FileSystemObject on the client side with IE and write files on the client's machine. Thankfully, there is a security warning.

var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:	estfile.txt", true);
a.WriteLine("This is a test.");
a.Close();

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact