Click to See Complete Forum and Search --> : initializing an input type file


blasteur
05-01-2003, 07:13 AM
I'm trying to set the value attribute of a fileUpload area with a javascript function, but it doesn't work...
has anyone heard about this problem ?

thanks

pyro
05-01-2003, 07:15 AM
For security reasons, you can not set the value of an <input type="file> tag with javascript.

blasteur
05-02-2003, 03:00 AM
great thank pyro, but I'm still searching a solution to automatically upload a file with javascript... but no doubt about it, it might be hard...

pyro
05-02-2003, 06:54 AM
It won't be hard, it will be impossible (with javascript). You need to use server side scripting. If your server supports PHP, I can tell you how to do it with that...