form field - it is the event.keyCode=0; which is causing the error. You will not be able to cancel the pressing of function keys while this element has focus, all you can do is isolate input to this element and exit without changing the keyCode value.
script function nuKeyPress() { if (event.srcElement.type == "file") { document.forms[0].frmExit.click(); //event.keyCode=0; return; } if (event.keyCode == 27 || event.keyCode == 115) { document.forms[0].frmExit.click(); event.keyCode=0; event.returnValue=false; return false; } if (event.keyCode >= 112 && event.keyCode <= 123) { event.keyCode=0; event.returnValue=false; return false; } } document.onkeydown = nuKeyPress; C:-) 0 LVL 63 Overall: Level 63 JavaScript
Sign in Pricing Blog Support Search GitHub This repository Watch 20 Star 343 Fork 162 cmlenz/jquery-iframe-transport Code Issues 16 Pull requests 8 Projects 0 Pulse Graphs New issue Script5: Access denied when trying to submit form #15 Open DzmitryNikitsin opened this Issue Jul 18, 2012 · 22 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 12 participants DzmitryNikitsin commented Jul 18, 2012 This issue appears only in IE9 when user came from gmail link. voxxit commented Sep 8, 2012 I can confirm that this is an issue even when not coming from a gmail link. There is a script access issue in IE9, period. DzmitryNikitsin commented Sep 8, 2012 Hrm, I see this issue only for users coming from gmail. Any chances to get it fixed ? Owner cmlenz commented Sep 8, 2012 Can you please provide more details about what you're doing so that I could try to reproduce it? DzmitryNikitsin commented Sep 8, 2012 We are sending email to our users, when user click link from the email he go to the page with popup. Popup has a field for file upload, upload starts only when user submit form. We use rails remotipart gem for async form submit(also i've tried jquery form plugin http://malsup.com/jquery/form/#code-samples, but the same issue). When i submit form i am getting "Script5: Access denied" in jquery.iframe-transport.js this happen only for IE9 and when user come from gmail. if user come from yahoo mail for example and use IE9 it works fine. Let me know if you need more description or you want me to share my screen and show you live example. Owner cmlenz commented Sep 8, 2012 Is there anything cross-domain involved here? DzmitryNikitsin commented Sep 8, 2012 No i am doing all on the same domain. voxxit commented Sep 10, 2012 This happens on a Facebook page for us. I'm not sure whether the issue happens or not when putting the FQDN/host before the path (i.e. http://blah.com/path instead of just /path), but that may be one thing to look into? DzmitryNikitsin commented Sep 10, 2012 I've tried http://domain/path and /path - the same issue ;( pivotal-redstone commented Oct 8, 2012 If you are using javascript to trigger a click on a file input, IE will mark that form as insecure and throw this error when you try to submit. Make sure you're letting the browser trigger a native click event on the file input. More info here DzmitryNikitsin commented Oct 8