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


Groups > comp.lang.javascript > #33790

Re: Input type file

Newsgroups comp.lang.javascript
Date 2017-08-15 08:26 -0700
References (7 earlier) <56ab82a4-5610-4f62-a7cc-6243e4b75bdd@googlegroups.com> <3b064746-986b-47fa-b197-7c048d803faa@googlegroups.com> <9ab93a24-6e20-439b-b7d1-6cad75851691@googlegroups.com> <fd0ee95e-0501-40d0-8161-41060c9c288a@googlegroups.com> <89e7d118-fc15-4c5b-af8d-740c2ebf1dba@googlegroups.com>
Message-ID <e4646533-9339-4267-9ce9-e80bd45fe763@googlegroups.com> (permalink)
Subject Re: Input type file
From jonas.thornvall@gmail.com

Show all headers | View raw


Den tisdag 15 augusti 2017 kl. 17:06:17 UTC+2 skrev jonas.t...@gmail.com:
> Den tisdag 15 augusti 2017 kl. 16:49:29 UTC+2 skrev jonas.t...@gmail.com:
> > Den tisdag 15 augusti 2017 kl. 16:42:55 UTC+2 skrev jonas.t...@gmail.com:
> > > Den tisdag 15 augusti 2017 kl. 16:36:20 UTC+2 skrev jonas.t...@gmail.com:
> > > > Den tisdag 15 augusti 2017 kl. 16:31:26 UTC+2 skrev jonas.t...@gmail.com:
> > > > > Den tisdag 15 augusti 2017 kl. 13:49:13 UTC+2 skrev JJ:
> > > > > > On Tue, 15 Aug 2017 03:43:23 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> > > > > > > But
> > > > > > > i wan't windows filedialog to open on click of "text,link, button,
> > > > > > > whatever" to write or set the id? before i call the save function. Is
> > > > > > > that possible?
> > > > > > 
> > > > > > Write or set the ID of what? Either way, just do all those things before
> > > > > > calling the `click()` method of the link element.
> > > > > 
> > > > > The id must be the file that is to be saved?
> > > > > I want it set from windows file save dialog.
> > > > > If you check script you see i managed to do it for file opening, it get the id directly from windows open file dialog without the necessity to write the filename. I would like the same approach for save.
> > > > 
> > > > But it seem to be alot harder i can not even get the file save dialog of windows to open? Well i can get a file to save use input ID="filename" but i do not want a textfield in menu i want to use microsoft file dialog to set the ID.
> > > > 
> > > > If i could do it for open it should be possible for save?
> > > 
> > > Here is how i managed to do it for open file it take the ID="filename" from windows file dialog and then open that file.
> > > 
> > > <label class="custom-file-upload"> 
> > >     <input type="file"/ id="fileToLoad" onchange="loadFileAsText()"> 
> > >     Load File 
> > > </label> 
> > > 
> > > But i just can't figure out a way even to open the filesave dialog, and i really looked hard for examples on the web but they fetch id from HTML/SCRIPT dialog before saving file i want the ID by microsoft save dialog?
> > 
> > Maybe it is confusing for you if you see it as a save of an already open file,that do not need a file dialog just to have the ID set upon open.
> > Think of it as a save as or a new file i want windows save file dialog to open but i don't even find examples of howto do it?
> 
> Just to be clear i talk about local file system to open savedialog, not serverside. You can try search there just isn't any example of anyone manage to do it?

What would had make sense to me 
<label class="custom-file-upload">
    <input type="load"/ id="fileToLoad" onchange="loadFileAsText()">
    Load File
</label>

<label class="custom-file-download">
    <input type="save"/ id="fileToSave" onchange="SaveFileAsText()">
    Load File
</label>

Now there is only the type="file" and that will only open the save file dialog, is there a way to circumvent this and get the save dialog to open?

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


Thread

Input type file jonas.thornvall@gmail.com - 2017-08-14 16:10 -0700
  Re: Input type file jonas.thornvall@gmail.com - 2017-08-14 16:42 -0700
    Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 01:35 -0700
      Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 01:50 -0700
        Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 03:07 -0700
          Re: Input type file Julio Di Egidio <julio@diegidio.name> - 2017-08-15 03:43 -0700
          Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 03:43 -0700
            Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 04:16 -0700
            Re: Input type file JJ <jj4public@vfemail.net> - 2017-08-15 18:49 +0700
              Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 07:31 -0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 07:36 -0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 07:42 -0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 07:49 -0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 08:06 -0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 08:26 -0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-15 08:45 -0700
                Re: Input type file JJ <jj4public@vfemail.net> - 2017-08-16 09:10 +0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-16 04:06 -0700
                Re: Input type file jonas.thornvall@gmail.com - 2017-08-16 05:27 -0700

csiph-web