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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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 53

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.
Independent Software Vendors: 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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

771 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