Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


read a text file on client

Posted on 2003-03-27
Medium Priority
Last Modified: 2008-03-17
How can I read some information from a text file on the client machine?
Question by:WhiteEagle

Accepted Solution

thanassis earned 100 total points
ID: 8216556
Using JavaScript, you cannot!
JavaScript is not capable of doing file IO.
You would need some kind of object (activeX or a plugin) to connect to the filesystem and grab the file.
LVL 55

Expert Comment

by:Ryan Chong
ID: 8216568
agree with thanassis, and you may need use the server side script languange to grab the file content, the current popular server side languange is like ASP, JSP, Coldfusion, php, etc.


Expert Comment

ID: 8216699
try using vbScript instead of javascript. go to www.planet-source-code.com and search under vbscript for file IO or "read text file". hope this helps.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 8216940
If the file is something written by you and less than 2kb, then you could just use cookies.

Expert Comment

ID: 8217101
instead of searching in vbScript in www.planet-source-code.com, u could search under javascript. who noes wat surprises u can find...

Expert Comment

ID: 8221313
it is possible, you can load a text file into a frame

You are not supposed to be able to read from this, but there are holes in IE that allow you to

So it CAN be done, but it should NOT be done, local files are the clients property...

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question