jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes generate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "generate "permission denied" javascript error" Watch "generate "permission denied" javascript error" New topic

generate "permission denied" javascript error

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
I use window.open to open a new window, it always generate "permission denied" javascript error. After I cancel that error box, I refresh that window, everything is good.

Do you have any solution ?

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
I google it. I find it related to Same origin policy, see this link.

But I am still not sure, say my url is

Then what document.domain I should set ?

Where should I set? I should set it in the main window or new window ?

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

That article talks about iframes. I am not sure that it's related to your problem. Have you checked your IE settings to see whether popups are allowed. I had run into a similar issue some time back and i remember, i had to do the following:

- Go to Tools-> Internet Options
- Click on Security tab
- Click on Custom level button
- In the Miscellaneous section click on "Enable" radio button under "Allow script initiated windows without size or position constraints"
- Click on OK. Click on OK again on the other window
- Open a new browser instance and access the application

This had worked in my case. Give it a try.

[My Blog] [JavaRanch Journal]
I agree. Here's the link: http://aspose.com/file-tools
subject: generate "permission denied" javascript error
It's not a secret anymore!