M
Martin Mrazek
Hi,
I use FSO ActiveXObject to save file from IE. In JS like
function saveToFile(pathN, content){
var fso, ts;
var ForWrite = 2;
fso = new ActiveXObject("Scripting.FileSystemObject");
ts = fspenTextFile(pathN, ForWrite, true);
ts.Write(content);
ts.close();
if (!fso.FileExists(pathN)) {
alert("The file <"+pathN+"> cannot be created.");
} else {
alert("Successfully saved");
}
}
surprisingly if the pathN contains unexisting path and the file is not
created, the fso.FileExists(pathN) still returns true (the message
"Successfully saved" is written...).
What's wrong there ?
Martin
I use FSO ActiveXObject to save file from IE. In JS like
function saveToFile(pathN, content){
var fso, ts;
var ForWrite = 2;
fso = new ActiveXObject("Scripting.FileSystemObject");
ts = fspenTextFile(pathN, ForWrite, true);
ts.Write(content);
ts.close();
if (!fso.FileExists(pathN)) {
alert("The file <"+pathN+"> cannot be created.");
} else {
alert("Successfully saved");
}
}
surprisingly if the pathN contains unexisting path and the file is not
created, the fso.FileExists(pathN) still returns true (the message
"Successfully saved" is written...).
What's wrong there ?
Martin