According to https://developer.mozilla.org/en/Using_files_from_web_applications,
Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) , you can hide the admittedly ugly file element and present your own interface for opening the file picker and displaying which file or files the user has selected.
With something like this (using jQuery):
$('a.upload').click(function(e) {
e.preventDefault();
$('input[type="file"]').click();
});
I am not asking what other ways there are to do this better. I am wondering what other browsers support the click event for input file just like this?
firefox 3.2+ versions do not support AFAIK because there is some security issue if the file input is hidden, chrome and ie support that I guess that's why people trigger the click putting the file input directly behind the fake elements
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With