0

window.opener.xyz(); - this is executed from the child page where xyz is a javascript function in the parent window. i am getting Permission denied in the window.opener. THis is happening in IE 11. Please let me know your inputs. thanks.

user1257836
  • 309
  • 2
  • 5
  • 10
  • If possible, could you provide the JS that is in the xyz function? – cfnerd Jun 10 '15 at 22:21
  • 1
    control is not even going to the js function... before hitting the function, permission denied error is coming for window.opener. – user1257836 Jun 10 '15 at 22:23
  • 1
    If you check the documentation here: https://developer.mozilla.org/en-US/docs/Web/API/Window/opener it says IE does not support if you are opening a site in a different security zone. It could be a setting in your browser – Kevin F Jun 10 '15 at 22:32
  • Kevin, page is loading up with in the same zone – user1257836 Jun 11 '15 at 00:17

1 Answers1

1

Based on an MSDN article, it is likely a problem with creating an Object in the child page. If so, try creating the Object in the parent page, not in the script in child page.

If that isn't the issue, here are a few Stackoverflow articles that might help your cause:

Why does this javascript cause “Permission Denied” error in IE

Internet Explorer - Check if permission denied

window.opener alternatives

Community
  • 1
  • 1
cfnerd
  • 3,658
  • 12
  • 32
  • 44
  • I am trying to use the suggestion "You can pass arguments to showModalDialog function. Simply pass window object as an argument. window.showModalDialog(theURL, window);Yo can access the arguments from the modal window using dialogArguments. See: http://msdn.microsoft.com/en-us/library/ms533723%28VS.85%29.aspx var openerWindow = window.dialogArguments;" – user1257836 Jun 10 '15 at 23:38
  • the variable "theURL" in " window.showModalDialog(theURL, window)" should be the location of the opener (parent ) page ? please clarify. – user1257836 Jun 10 '15 at 23:40
  • 1
    CAn you please explain this with an example - "Based on an MSDN article, it is likely a problem with creating an Object in the child page. If so, try creating the Object in the parent page, not in the script in child page." – user1257836 Jun 10 '15 at 23:46