PDA

View Full Version : read files js



jvpython
12 Feb 2010, 08:52 PM
Hi everyone,
i making a website at the moment and i have a javascript code that reads and writes files on the server side but when i launch the website i get theis error:Webpage error details

Message: 'File' is undefined
Line: 17
Char: 6
Code: 0
URI: file:///C:/myfilepath/myfile.txt

heres the script:


var file = new File("file.txt");
var fileIsOpen = file.open("r+");

if (fileIsOpen) {
statusfi.writeln("test");
alert("done writing...");

status.close();
} else
alert("A problem occured...");


thanks

jvpython