Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script5: Access denied when trying to submit form #15

Open
DzmitryNikitsin opened this issue Jul 18, 2012 · 22 comments
Open

Script5: Access denied when trying to submit form #15

DzmitryNikitsin opened this issue Jul 18, 2012 · 22 comments

Comments

@DzmitryNikitsin
Copy link

This issue appears only in IE9 when user came from gmail link.

@voxxit
Copy 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
Copy link
Author

Hrm, I see this issue only for users coming from gmail. Any chances to get it fixed ?

@cmlenz
Copy link
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
Copy link
Author

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.

@cmlenz
Copy link
Owner

cmlenz commented Sep 8, 2012

Is there anything cross-domain involved here?

@DzmitryNikitsin
Copy link
Author

No i am doing all on the same domain.

@voxxit
Copy link

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
Copy link
Author

I've tried http://domain/path and /path - the same issue ;(

@pivotal-redstone
Copy link

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
Copy link
Author

I don't trigger click or file assignment in javascript for input type='file', but still having this issue

@pivotal-redstone
Copy link

Try making sure your popup has a real path (instead of just injected content). If its path isn't on your domain (and "" isn't on your domain) you will get stopped because of cross domain problems.

@skunkbad
Copy link

IE9 is giving me the error as well. Access is denied. Line 201, character 13, which is form[0].submit(); I'm using the most simple code to test, and the everything is same domain.

$.ajax({
    url        : options.action,
    dataType   : 'json',
    files      : $(file_input),
    iframe     : true
}).complete(function( response ){
    console.log( response );
});

options.actions can be absolute or relative, doesn't make a difference. Working with other browsers, but IE9 is a big deal to support. I'll keep searching around Google and see if anyone else fixed this.

@mwagena
Copy link

mwagena commented Oct 26, 2012

've got the same problem, all browsers are doing OK, all but IE9...

@mdesantis
Copy link

I get this error too

@rvalle
Copy link

rvalle commented Feb 11, 2013

does this plugin work at all in IE9?

@DzmitryNikitsin
Copy link
Author

yes it works for IE 9 fine when you came to page directly or from email other then gmail.
It just doesn't work when you came to the page from gmail.

@rvalle
Copy link

rvalle commented Feb 11, 2013

I managed to reproduce the behavior that you describe: a link that works from icloud but not gmail.

however, gmail is still widely popular.

do you have any idea about the underlying technical issue? Is there any documentation about it?

Workarounds? or at least being able to detect that it is going on.

I have also tested http://blueimp.github.com/jQuery-File-Upload/ which also uses an iframe solution and seems to suffer the same issue.

@simonspoerri
Copy link

When i had the same issue it was indeed because of triggering the click event on the file input. Using the native (and ugly indeed) file input control solved the problem for me!

@vsapram
Copy link

vsapram commented Feb 11, 2014

I too faced the same problem.Problem is triggering the click through javascript.
Solution is here.http://jsfiddle.net/rudiedirkx/8hzjP/show/

@PunkChameleon
Copy link

@vsapram Can you expand on your solution at all? Stuck in the same place!

@PunkChameleon
Copy link

This is killing me at the moment. Is it possible for someone to sum up any solutions they found? Would really appreciate it forever!

@jeroenherczeg
Copy link

Could it be if the site is hosted with SSL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests