Log in

View Full Version : FILE default value



Black Label
07-04-2008, 09:24 PM
hi,

does anybody know how to assign a default value for input type=file?

<input type="File" name="myFile">


do we need Jscripts? such that:

document.xxx.myFile.value = "c:\blablabla.txt";
??

Thanks

djr33
07-04-2008, 09:33 PM
Due to security purposes, the only way to set a value for file is to manually have the user select it. Otherwise, it would be possible to steal files from the user's computer one way or another.

Black Label
07-04-2008, 10:34 PM
o no.
the whole project depends on this action :(


thanks djr ..

djr33
07-04-2008, 11:18 PM
What are you trying to do? Perhaps we can suggest something.

However, there's a good chance your project is impossible, because the same functions could be used maliciously against the users.