In Javascript you can read file from local dir. Using IE extension
(Jscript 5) but in your client browser you must have a permission to do
this, ...
But i have for you a tips if you want to insert a text file content in
your current page :
1- Rename your txt file foo.txt to foo.js
2- modify foo.js content as follow :
if the foo.js content is
xxxxxxxxxxxxx
yyyyyyyyyyyyy
zzzzzzzzzzzzz
modify it like this
fooVar = "xxxxxxxxxxxxx"
"yyyyyyyyyyyyy"
"zzzzzzzzzzzzz";
3- inside your <head> tag add this
<SCRIPT language=JavaScript src="foo.js"></SCRIPT>
4- you inserts the fooVar content inside a div (by example)
if the div is <div id="fooDiv"></div>
in the OnLoad event function add this :
document.getElementById('fooDiv').innerText = fooVar;
5- have fine
-----Message d'origine-----
De : A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]] De la part de Sabari Arasu (CTC)
Envoy� : mardi 5 f�vrier 2002 11:35
� : [EMAIL PROTECTED]
Objet :
I dont think this is possible in JavaScript(If i understand ur
requirement
correctly.)
Sabari Arasu
AIG - TCS
Chennai
India
> -----Original Message-----
> From: [Aruniima Chakrabarti]
> [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 05, 2002 4:47 PM
> To: [EMAIL PROTECTED]
> Subject:
>
> I want to open a file in the same window where the file name is
> specified at runtime. i.e if I have a file called "xyz.txt",
> I should be able to see the file contents in same browser window.
> Thank you for your time. Any help is welcome as I am completely new to
> Javascript.
>
> Regards,
> aruniima
>
> -----Original Message-----
> From: Sabari Arasu (CTC) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 05, 2002 4:50 PM
> To: [EMAIL PROTECTED]
> Subject:
>
> Do u want to open the file dialog box thru JavaScript???
>
> Sabari Arasu
> AIG - TCS
> Chennai
> India
>
> > -----Original Message-----
> > From: [Aruniima Chakrabarti]
> > [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 05, 2002 4:38 PM
> > To: [EMAIL PROTECTED]
> > Subject:
> >
> > Hello everyone,
> > I need to read a file in an html page. Could anyone help me
> > to read a file using JavaScript? I am using JavaScript for the first
> > time.
> Kindly
> > help.
> > Very sorry for posting a non-jsp question.
> >
> > Regards,
> > aruniima
> >
> >
> ----------------------------------------------------------------------
> ----
> > --
> >
> > This message contains privileged and confidential information and is
> > intended only for the individual named. If you are not the intended
> > recipient you should not disseminate, distribute, store, print, copy
> > or deliver this message. Please notify the sender immediately by
> > e-mail if you have received this e-mail by mistake and immediately
> > delete this e-mail from
> > your system.
> >
> >
> > E-mail transmission cannot be guaranteed to be secure or error-free
> > as information could be intercepted, corrupted, lost, destroyed,
> > arrive
> late
> > or
> > incomplete, or contain viruses. The sender therefore does not accept
> > liability for any errors or omissions in the contents of this
> > message which arise as a result of e-mail transmission. If
> > verification is required please request a hard-copy version.
> >
> >
> >
> ----------------------------------------------------------------------
> ----
> >
> >
> ======================================================================
> ====
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body:
> > "set JSP-INTEREST DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://archives.java.sun.com/jsp-interest.html
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.jsp
> > http://www.jguru.com/faq/index.jsp
> > http://www.jspinsider.com
>
> ======================================================================
> ====
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
> ----------------------------------------------------------------------
> ----
> --
>
> This message contains privileged and confidential information and is
> intended only for the individual named. If you are not the intended
> recipient you should not disseminate, distribute, store, print, copy
> or deliver this message. Please notify the sender immediately by
> e-mail if you have received this e-mail by mistake and immediately
> delete this e-mail from
> your system.
>
>
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive
> late or incomplete, or contain viruses. The sender therefore does not
> accept liability for any errors or omissions in the contents of this
> message which
> arise as a result of e-mail transmission. If verification is required
> please request a hard-copy version.
>
>
> ----------------------------------------------------------------------
> ----
>
> ======================================================================
> ====
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found
at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com