I am using Scripting.FileSystemObject to save file to my hard disk,
my browser is IE6.0 and the code is like the following,
try{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var tempFile = fso.CreateTextFile('c:\\test.txt', true);
tempFile.WriteLine("this is a test");
tempFile.Close();
}
catch(err){
alert(err.description);
}
a button click event is used to trigger that saving procedure,
first time when I clicked the button, a warning dialog jumped out to tell me activeX is trying some unsave operation and asked if I will permit it, then I found if I clicked yes to continue, no problem, the file will be saved correctly, but if I clicked no to cancel the saving process, an error message "automation server can't be created" will get out and from then on, the file saving failed everytime with the same error "automation server can't be created", unless I reopened that page once again
my question is without reopening the page, is there some way else to solve the problem, I appreciate your help very much!
my browser is IE6.0 and the code is like the following,
try{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var tempFile = fso.CreateTextFile('c:\\test.txt', true);
tempFile.WriteLine("this is a test");
tempFile.Close();
}
catch(err){
alert(err.description);
}
a button click event is used to trigger that saving procedure,
first time when I clicked the button, a warning dialog jumped out to tell me activeX is trying some unsave operation and asked if I will permit it, then I found if I clicked yes to continue, no problem, the file will be saved correctly, but if I clicked no to cancel the saving process, an error message "automation server can't be created" will get out and from then on, the file saving failed everytime with the same error "automation server can't be created", unless I reopened that page once again
my question is without reopening the page, is there some way else to solve the problem, I appreciate your help very much!
Comment