Is it possible to access file with extension *.txt or *.file in JavaScript? I want to call this file in my function?
3 Answers
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.
Comments
As of HTML5 there are new features for file access, see https://stackoverflow.com/a/7056216/356726
.txtor.file?