Re: Downloading a file with JS
From: Saint Jude (thejuliankennedy_at_hotmail.com)
Date: 02/13/04
- Next message: Roland Hall: "Re: Plugin-Detection"
- Previous message: Spaceman007: "Re: Acrobat Reader Plugin"
- In reply to: Utada P.W. SIU: "Re: Downloading a file with JS"
- Next in thread: Randy Webb: "Re: Downloading a file with JS"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Feb 2004 12:27:36 +0100
Here are a couple of ideas that don't involve server-side includes:
1) Put the content of the text file into a string variable in an external
.js file.
This can be inconvenient for larger files, so...
2) Have a look at IE's default download behavior. It's quite simple to use.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/behaviors
/reference/behaviors/download.asp
Cross-browser methods probably involve either XMLHTTP requests, or an
invisible Iframe.
Utada P.W. SIU <wing0508@hotmail.com> wrote in message
news:e4YNRjf8DHA.3008@TK2MSFTNGP09.phx.gbl...
> sorry, misunderstand the question
> does Sandor said she have a file placed in the server, and a string
content
> inside that file, now, she want retrieve that string content from the
file??
>
> "Randy Webb" <hikksnotathome@aol.com> wrote in message
> news:24WdnWEG6b9O17HdRVn-gw@comcast.com...
> > Utada P.W. SIU wrote:
> > > window.location = FILE_PATH;
> > >
> >
> > And how exactly will setting window.location to the path of the file
> > "load in a String the content of a file" ??
> >
> >
> > > "Luci Sandor" <lucisandor@n.ospam.msn.com> wrote in message
> > > news:%23DHe1wb8DHA.1000@TK2MSFTNGP11.phx.gbl...
> > >
> > >>Hi,
> > >>I'm trying to load in a String the content of a file placed on the
> server.
> > >>I'm interested in a method as old (read: portable) as it could be, a
> thing
> > >>that would work in the 3 browsers.
> > >>TIA,
> > >>LS
> > >>
> > >>
> >
> > OP: Look into a Java Applet or the HTTPRequestObject, both can be found
> > from the comp.lang.javascript FAQ linked to in my signature.
> >
> >
> > --
> > Randy
> > Chance Favors The Prepared Mind
> > comp.lang.javascript FAQ - http://jibbering.com/faq/
> >
>
>
- Next message: Roland Hall: "Re: Plugin-Detection"
- Previous message: Spaceman007: "Re: Acrobat Reader Plugin"
- In reply to: Utada P.W. SIU: "Re: Downloading a file with JS"
- Next in thread: Randy Webb: "Re: Downloading a file with JS"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|