M
mydirac
hello,
I'm thinking about javascript's producing another file.
Can I do it?
I'm thinking about javascript's producing another file.
Can I do it?
mydirac said:I'm thinking about javascript's producing another file.
Can I do it?
Richard said:JavaScript can write files but only indirectly and only in some
environments. From an (unspecified) web browser writing to the client's
files system would be a security violation and is close to being
impossible, certainly not worth the effort.
It should be possible to provide something like a Java applet what would
permit the writing of a file to your server and be scriptable with
JavaScript.
Doing so would be massively stupid as such an applet would
be trivial to hijack and you would not want some remote user to be able
to choose to write anything they wanted to your server.
The normal HTML form/HTTP based request to server, sending information
that may be placed in, or added to, a file and server-side scripting to
check that information and then file it, is the only sensible approach
as you get to choose what control to place on what is written to your
server/databases (and the client cannot ascertain any of the details).
Richard.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.