File I/O using Javascript

H

hiteshc.techie

Hi All,

Can we do file I/O on the client system using Javascript?
Or is there any other option available.

Thnx
 
E

Evertjan.

Hi All,

Can we do file I/O on the client system using Javascript?

Not using a browser with normal security settings.
Or is there any other option available.

Oh certainly, in many a language,
but you would have to skip this "client" idea,
or compromize security.
 
K

kkkk

Hi All,

Can we do file I/O on the client system using Javascript?
Or is there any other option available.

Thnx

You may write some infomation in cookies instead
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
oglegroups.com>, Tue, 7 Aug 2007 15:43:27, "(e-mail address removed)"
Can we do file I/O on the client system using Javascript?
Or is there any other option available.

If you have the co-operation of the user and only a modest amount of
I/O, you may be able to use textareas for I/O and mew windows for
output, getting the user to copy'n'paste accordingly.
 
S

Steve Swift

You may write some infomation in cookies instead

Now there's an interesting concept: A function library that gives you a
complete set of file I/O functions with the underlying data stored in
cookies…

It would even emulate the occasionally failing hard-drive! :)
 
S

Steve Swift

If you have the co-operation of the user and only a modest amount of
I/O, you may be able to use textareas for I/O and mew windows for
output, getting the user to copy'n'paste accordingly.

And with a different sort of co-operation you could do the equivalent of
a file read using an <INPUT TYPE=FILE> control and a file write by
generating a file download stream.

I've used such a mechanism on a website that I built to fix corruption
in certain files - it was easier to write a site to fix up the files
than trying to explain the steps to people who'd never met an editor.

The problem with this approach (and one I totally agree with) is that
you cannot specify the file to be uploaded; that is left entirely to the
user(*).

(*) See http://www.swiftys.org.uk/wiz?854
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top