Re: Downloading a file with JS

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Saint Jude (thejuliankennedy_at_hotmail.com)
Date: 02/13/04


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/
> >
>
>



Relevant Pages

  • SQL Connection Problem
    ... An error has occurred while establishing a connection to the server. ... database location within the applications App_Data directory. ... Boolean& failoverDemandDone, String host, String failoverPartner, String ... user, String password, Boolean trusted, String connectionString) +68 ...
    (microsoft.public.dotnet.framework.aspnet)
  • server-side JavaScript: Prototypes of built-in classes, objects and functins
    ... Session object (disk-based session variables for data persistence ... File class (manipulation of files on server, ie. open, close, read, ... //Methods Cgi.queryCgi.postCgi.anyby default return an empty string if requested var not found ...
    (comp.lang.javascript)
  • Re: App_data - ASPNETDB.MDF
    ... is only because I want my site work, without exception. ... Server Error in '/' Application. ... serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SSP backup
    ... 2)MOSS_SETUP_FARM is a dbo on the config database. ... Application Server Administration job failed for service instance ... name, ApplicationPoolIdentityType identityType, String userName, SecureString ... password, TimeSpan idleTimeout, TimeSpan periodicRestartTime) at ...
    (microsoft.public.sharepoint.windowsservices)
  • Web Part and Access database
    ... Server Error in '/Webparts' Application. ... SQLExpress database file auto-creation error: ... The connection string specifies a local Sql Server Express instance ... String user, String password, Boolean trusted, String connectionString) ...
    (microsoft.public.sharepoint.portalserver.development)