Tuesday, April 11, 2006
As the interweb is currently arranged it is almost impossible to do what I want to do. But if you're running Windows and Internet Explorer, it can be done. You have to use an ActiveXObject and do something like this:
var fname = "theFileName.txt";Once you've done that you can, behind the User's back do the AJAX thing and send the contents of the file to the server from which the page was accessed. There are other methods that will open binary files.
var fso = new ActiveXObject("Scripting.FileSystemObject");
var theFile = fso.OpenTextFile(fname, 1, true);
var fileContents = theFile.readAll();
That's fucking insane.
Links to this post: