I have a requirement where i need to trigger the input[type=file] from another button and upload the files. This input[type=file] is a popup window for browsing the file which the user wants to upload. This window opens successfully but when uploading the file, it gives me SCRIPT5: Access is Denied error
. I cannot replace the fake button with input[type=file], is there a way i can trigger click on input[type=file] even it is not from keyboard click and still upload the file. As per my research IE doesn't allow upload file unless we trigger input-type=file via keyboard click.
var uploadConfig ={
init: function(){
$('input#fileUpld_input').livequery("click",function() {
});
},
open: function() {
$('input#fileUpld_input').trigger('click');
},
upload: function(){
$('.start').click();
}
Browser
<input type="file" id="fileUpld_input" name="fileUpld_input" class="fileUpld">