View Full Version : Saving text in a text box as a .txt

08-03-2006, 11:46 AM
hi i was wondering how i could save text in a text box as a .txt on a click of a save button. I hope it is possibly so that it will finish my app off nicely

08-03-2006, 02:03 PM
What you need is the FileSystemObject. A short example:

function WriteToFile(sText){
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\test.txt", true);

sText obviously are the contents of the textarea; you will have to pass them to this function. And let the user choose where he wants to store the textfile. Happy coding :)

08-04-2006, 12:49 PM
thanks i hope this works

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum