Ok so I have an input element of type file and id \"test\"
When I put in the address bar: javascript: document.getElementById(\"test\").click() it brings up the open fil
I had the same problem and managed to solve it(though I am using jQuery). I detailed the technique in another question
Jquery trigger file input
The idea was essentially to focus the file input before triggering the click programatically.
You should wrap file-input element to other (ex.:div): HTTM:
<div>
<input type='file'>
<div>
CSS:
div{
height:1px;
overflow: hidden;
}
JS:
$('div input').click();
Good luck...