Not with the core JavaScript language. One way would be to utilise the
FileSystemObject (search MSDN for examples), this is a COM class but marked
as unsafe so unable to be used on web pages unless a low security scenario.
For simple access from a web page IE has the 'download behavior' built in
which can read text files from the server the web page originated, again
search MSDN for examples.
Joe
>From: soni29@h...
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] Reading a file with Javascript?
>Date: Tue, 30 Jul 2002 17:18:05
>
>hi,
>is there a way to use javascript to read data in from a file? If i had a
>file, text1.txt, and had two names in it, is there a way to get javascript
>to read them in and store them into variables?
>Thanks.
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com