Javascript file IO

Started by
6 comments, last by Khaos 20 years, 3 months ago
Is it possible to read ASCII or binary files, and/or write ASCII or binary files using &#106avascript? If so, how? I have not been able to find any documentation on it. Thank you.
Advertisement
It is possible if you use JScript and use it to create a FileSystemObject File object.
.
isn''t that just server side?

The idea would be using LiveConnect - a feature to instantiate Java classes from within JScript. Sad thing the idea has two catches:

LiveConnect only existed in older Netscape Browsers - current Versions don''t do it anymore, neither does IExplorer.

If you could create the instance, I doubt it would work as Java run in Browsers has a very restrictive SecurityManager which will probably disallow File access. I assume you could circumvent this by using certificates (or whatever they are called in Java).
I may be getting older, but I refuse to grow up
quote:Original post by Themonkster
isn''t that just server side?


Yes.
.
If you''re hoping to have access to a client''s file system from a web page script you''re out of luck.

You''d have to get the user to install an activex control that allowed your script access to the filesystem.

I hope no one would ever install something like that!
There does not exist any simple (see ActiveX comment above) way to access client files. That would be such a security hazard! How would you like a website being allowed to read (and write!) to your password files, system files, etc?
activex controls are not secure.

This topic is closed to new replies.

Advertisement