I\'m playing with JavaScript and wrote simple function that creates INPUT
element (type=\"file\"
) and simulates click.
var createAn
You can do something like this to trigger click on change of dynamically created file input
var input = document.createElement ("input");
input.setAttribute ("type", "file");
input.addEventListener('change', function(){
input.addEventListener('click', function(){
alert("Clicked");
input.removeEventListener("click", function(){})
}, false);
input.click();
}, false);
JS fiddle
I have tested this in chrome, firefox, opera nd IE. It works