how to access file in javascript?

javascript

Solution

If you are talking about javascript running in a web browser then the answer is no, you cannot access files on the client computer unless you use some proprietary technology like Silverlight, ActiveX, Flash, ...

If you want to access files stored on the server then you could use AJAX to query a server side script which would return the contents of the file.

Problem

Is it possible to access file with extension *.txt or *.file in JavaScript? I want to call this file in my function?

Original source

Related problems