i have a form thats inside a iframe with a input type file with an onchange event that submits the form whenever the input is modified, then i get a error in IE only works in other browsers.
e.g. (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 beleive it as to do with the fact that IE thinks its a security risk to submit from a event that wasn’t fired by a user or it may have to do with the fact that it happens in an iframe. Any ideas on how to get around this ?
EDIT
It looks like the problem may have to do with the fact that the input[type:file] is hidden, well its got a small width and opacity:0 . after making it show and putting a submit button there it works , but i need it to work without the input[type:file] showing and without a submit button. However tried it with the input[type:file] showing and submiting in the onchange still doesn’t work.
Seems the problem is IE doesn’t like it when you programtically set and submit file inputs. Found now way around this so giving up. I’m opting for using Jquery uploadify as a fallback when user is in IE. This puts an unwanted dependency on flash but thats the best alternative i can come up with.