Click to See Complete Forum and Search --> : Allow <INPUT type="file"> to select files that donīt exist ?


Realgar
05-25-2005, 11:40 AM
I need a control like Input type = file, that will allow the user to select a location on his computer, but it must allow him to select a file that donīt exist, because the control is actually going to ask him a location to save a file, the webpage will then create a file in the location he chose (the file doesnīt exist on the server so he canīt download it, an activex control will create the file on the location he chooses), it must also ask him if he wants to overwrite a file if he chose one that already exists.

Currently Iīm asking the user to type the location of the file on a textbox, which is kinda ugly.

I hope I made myself clear here, thanks for answers.

Flunky Monkey
05-29-2005, 06:12 PM
When form submits with input type="file" the field is submited like whole with all of the file contents. When it submits, it includes each of the contents
of the file not only the file location.
Use JavaScripts' onsubmit event to transfer the value of the field to hidden field in different form and then submit form 2.

Realgar
05-31-2005, 04:36 PM
Hmm but the problem is that when I use input type="file" it only allow me to select a file that already exists on the clientīs computer, it doesnīt let the user type the name of the new file. If it allowed then it would be no problem, Iīd just get the value on the file control and create the new file as that value.

An example of what Iīm trying to do can be found on this site where they have the same problem I have (I am using the same activeX they used)
http://www.contourcomponents.com/cgi-bin/cubes.cgi?action=show_cube&id=0

just try to save their "cube" clicking on the save icon, they will show a input type="file" that allows the user to browse but it doesnīt allow the user to select a new file, only existing ones, even though the activeX control can save to a new file.