Mar 27, 2002
21
0
0
I need help with some Javascript. I'm familiar with how to do this in Java but not sure how it is done in Javascript. I am running a webserver on my computer and I want one of my pages to read from a file on my computer. The only way I know how to do this is to create a BufferedReader wrapped around a FileReader. I tried that and i'm not sure if the syntax was correct but it didn't work.
Any help would be great.
 

IaPuP

Golden Member
Mar 3, 2000
1,186
0
0
Need to clarify a bit.

You want the JS to read a file off the server and somehow use it on the client's computer?

I think you use a URL open function.... you wouldn't use a normal "file" operation. Put the file on the webserver and open it as a URL.

If you're trying to read a file off the CLIENT computer, you can't. It's called security. :)

Eric