[Javascript] I want to write to a file using JavaScript

Richard Lewis richardlewis at fastmail.co.uk
Fri Mar 11 08:56:06 CST 2005


On Fri, 11 Mar 2005 20:06:44 +0530, "Poonam Pandey"
<poonamdp3 at gmail.com> said:
> Hi,
>  I want to write to a file using Javascript
In short, you can't do this with client-side JavaScript because its
insecure.

> but when i use
> ActiveXObject it shows the warning "An ActiveX Cotrol on this page is
> trying to interact with other parts of the application.It may be
> unsafe to doso.Do you want to allow this interaction?"
> And also i tried disabling the ActiveX options in the Internet
> properties -options but it doesnt take up these settings.
> Mine is a windows service pack4
> 
(Note that ActiveX allows communication around the MS Windows "operating
system" only; check out MS's support pages)

> Then in read that we can use File Object to write to a file but even
> this is not working as it is giving some errors as File object is not
> recognised.
> 
There is no File class in standard JavaScript.

> How can i use that File object in my JavaScript file?And after using
> this File object does this JavaScript becomes a Server Side
> JavaScript?
> 
You can use server-side JavaScript with the correct server software. The
main environment for running server-side JavaScript is Microsoft's ASP.
You can't run server-side JavaScript within a browser (this is
client-side); client-side JavaScript can never magically become
server-side JavaScript.

Richard.



More information about the Javascript mailing list