How to auto-open file dialog window, cross-browser?

I have an <input type=“file”> field and I would like the file chooser dialog to open automatically after the page loads, for example on onload(). I have found a trick with executing click() in js on the file element but it seems to only work in IE. Are there any methods that would work in FF and other browsers as well?

The problem with forcing a click action on an element is that Firefox does not recognize this on elements that are not of type button.

You could try prototyping a click action on the target element, but I’m not even sure that this would work

What you are trying to do may be better achieved by running a server-side script.