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


Groups > comp.lang.javascript > #33860

Re: Further question on cloneNode

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Further question on cloneNode
Date 2017-08-23 03:39 +0200
Organization PointedEars Software (PES)
Message-ID <7377037.NyiUUSuA9g@PointedEars.de> (permalink)
References (2 earlier) <42cd59d8-b76c-4149-93ad-2f949adfdfdf@googlegroups.com> <d2229d94-33dd-44db-801b-83665052b396@googlegroups.com> <on6vc7$a5p$1@dont-email.me> <a6dfafcf-e4f2-48b7-9255-63f3184d3339@googlegroups.com> <1wxbjx0onyclf.8050zhqrgkq.dlg@40tude.net>

Show all headers | View raw


JJ wrote:

> Store the original file name which was previously chosen from the
> open-file dialog into the `download` attribute of an `A` element (instead
> of an `INPUT` element). Call the `click()` method of that `A` element to
> display the save-file dialog (and download the URL pointed by that `A`
> element). The `A` element must be placed into the document in order to
> work.

In Chromium, this triggers a confirmation dialog of the form

|                                         [x]
| http://example/ wants to: 
| 
| [v] Download multiple files
| 
|                       [ Block ]   [ Allow ]

Since the `download` attribute is an HTML5 feature, it might be better to 
trigger a server-side script that suggests the download instead.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

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


Thread

Further question on cloneNode justaguy <lichunshen84@gmail.com> - 2017-08-14 12:56 -0700
  Re: Further question on cloneNode Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2017-08-15 08:23 +0200
  Re: Further question on cloneNode JJ <jj4public@vfemail.net> - 2017-08-15 18:34 +0700
    Re: Further question on cloneNode justaguy <lichunshen84@gmail.com> - 2017-08-16 14:01 -0700
      Re: Further question on cloneNode jonas.thornvall@gmail.com - 2017-08-18 06:23 -0700
        Re: Further question on cloneNode Flng Fck <nothanks@invalid.invalid> - 2017-08-18 17:03 +0200
          Re: Further question on cloneNode jonas.thornvall@gmail.com - 2017-08-18 08:26 -0700
            Re: Further question on cloneNode JJ <jj4public@vfemail.net> - 2017-08-21 21:40 +0700
              Re: Further question on cloneNode Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-23 03:39 +0200

csiph-web