I have a form inside an iframe with an input type file with an onchange event that sends the form whenever the input changes, then I get an error in IE, it works only in other browsers.
eg. (simplified version)
<form id="form1">
<input type="file" id="_file" onchange="document.forms[0].submit();$('#form1').hide()" />
<input type="button" onclick="$('#_file').click();" />
</form>
then IE 8 gives this error:
SCRIPT5: Access is denied.
I believe this is because IE thinks that its security risk may be dispatched from an event that was not fired by the user, or it may be related to the fact that this happens in an iframe. Any ideas on how to get around this?
EDIT
It seems that the problem may be due to the fact that the input [type: file] is hidden, and its width was small and opaque: 0. after it shows and places the submit button there, it works, but I need it to worked without typing [type: file] and without a submit button. However, I tried it with the input of [type: file], showing and submitting to onchange, still does not work.
source
share