javascript - save result to txt file on company shared folder -
this problem cant save results driver x company shared folder , have permission write reason , can save on driver c.
the messege show
webpage error details
message: automation server can't create object line: 93 char: 1 code: 0 uri: file:///x:/omrildocs/omrix%20public/all%20omrix%20public/training/index.html
notic : can use javascript , no server side language allowd :(
this code use
alert(answertext); var fso = new activexobject("scripting.filesystemobject"); var s = fso.createtextfile("x:\omrildocs\omrix public\all omrix public\training\text.txt", true); s.writeline(answertext); s.close();
im using ie8 on xp 2
you need replace \
\\
.
should like:-
var s = fso.createtextfile("x:\\omrildocs\\omrix public\\all omrix public\\training\\text.txt", true);
while running, gives popup window need allow create file.
screenshot like:-
Comments
Post a Comment