Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #21253

Re: Write variables to file?

From Ken <usenet-so@abdiassoftware.com>
Newsgroups comp.lang.javascript
Subject Re: Write variables to file?
Date 2013-09-10 12:15 -0500
Organization Abdias Software
Message-ID <l0nk4t$kmm$3@speranza.aioe.org> (permalink)
References <8eqdnQgNPt5ncrPPnZ2dnUVZ5hSdnZ2d@giganews.com> <kl0ldr6xnued.1e5nvapifsd1h$.dlg@40tude.net>

Show all headers | View raw


On 10.09.2013 06:13, JJ wrote:> On Tue, 10 Sep 2013 03:10:02 -0700, 
Robert Crandal wrote:
>> Can I use Javascript to write data into a text file on the
>> client machine?  I tried experiement with cookie objects, but this

> Easiest metod is to use data URI to save the data, but there is no way to
> provide the file name. The user will have to type the file name manually

Actually you can provide a file name - sort of. You can use an A element 
with the new *download* attribute:

   a href="data:..." download="myFilename.txt">Click to download</a


-- 
Ken Fyrstenberg
Abdias Software
http://abdiassoftware.com/
(remove usenet- from address)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Write variables to file? "Robert Crandal" <rcranz143101@gmail.com> - 2013-09-10 03:10 -0700
  Re: Write variables to file? Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-10 10:24 +0000
  Re: Write variables to file? Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2013-09-10 18:42 +0800
  Re: Write variables to file? Martin Honnen <mahotrash@yahoo.de> - 2013-09-10 12:45 +0200
  Re: Write variables to file? JJ <duh@nah.meh> - 2013-09-10 18:13 +0700
    Re: Write variables to file? Ken <usenet-so@abdiassoftware.com> - 2013-09-10 12:15 -0500
    Re: Write variables to file? dhtml <dhtmlkitchen@gmail.com> - 2013-09-30 00:44 -0700
  Re: Write variables to file? Ken <usenet-so@abdiassoftware.com> - 2013-09-10 12:31 -0500

csiph-web