Skip to main content
gamedev.net
🔒 Locked

Javascript file IO

Started by Khaos Jan 4, 2004 at 9:53 PM 6 replies 650+ views
Original Post
Khaos
Khaos
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.
Mastaba
Mastaba
It is possible if you use JScript and use it to create a FileSystemObject File object.
Dreamforger
Dreamforger
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
Mastaba
Mastaba
quote:
Original post by Themonkster
isn''t that just server side?



Yes.
ms291052
ms291052
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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.