Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

The JavaScript FAQ
Prev Home Next

Writing a File

Question: How do I write a file from JavaScript?

Answer: Writing a file from JavaScript is just as easy as writing a file from a Java applet. Your script cannot write files itself; it should call a Java applet's public method which will actually do all the dirty file writing work for you.

The bad news is that

  1. Writing is a privileged operation, and therefore your Java applet must be digitally signed in order to write files.
  2. Applet signing for Internet Explorer is completely different from applet signing for Netscape Navigator.
  3. Signed applets may not work properly in Netscape Navigator 3.
  4. What's the worst, it's very insecure to put privileged operations in public methods of signed applets! If you publsh such an applet, a malicious code could easily subvert the applet's public methods, and you (the applet publisher/signer) will be sued for any damage!
Therefore, nobody publishes scripts that write files via signed applets, although in versions 4 of both major browsers it's technically possible.

JavaScripter.net. Copyright © 1999-2006, Alexei Kourbatov

The JavaScript FAQ
Prev Home Next


 
 
  Mirrored with kind permission of Alexei Kourbatov Design by Interspire