Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q994 Can I write to a file on the client machine?

irt.org | Knowledge Base | JavaScript | File | Q994 [ previous next ]

Q994 Can I write to a file on the client machine?

Only in Netscape Navigator 4+ after requesting extra priviledges:

<script language="JavaScript"><!--
function writeToFile(fileName,text) {
 
netscape.security.PrivilegeManager.enablePrivilege('UniversalFileAccess');
    var fileWriter = new java.io.FileWriter(fileName);
    fileWriter.write (text, 0, text.length);
    fileWriter.close();
}

if (document.layers) {
    writeToFile('file.txt','Hello World');
}
//--></script>

Feedback on 'Q994 Can I write to a file on the client machine?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.