I've heard that you cannot use javascript to change the .value of an input field of type "file".
Is this true? If not, can someone show me how it's done?
Printable View
I've heard that you cannot use javascript to change the .value of an input field of type "file".
Is this true? If not, can someone show me how it's done?
Nope you cannot.
You cannot, because doing that would be insecure. I could steal any file from your computer automatically without you even knowing about it.
Cheers,
RyanJ
That reasoning had escaped me. Thanks very much.
Quote:
Originally Posted by mendhak
Your welcome.
not many people actually think fo that way bit if you were using a PHP script and you could change the value then you could literally upload any file you liked, password files etc :)
Cheers,
RyaNj