How to resolve JavaScript permission denied error?

I have run into a scenario where the contents of the original window and the modal window come from two different web servers. When I tried to close the modal widow using "parent.Control.Modale.close()" in the modal window, I did receive the JavaScript permission denied error.

In this scenario, is there a way closing the modal window from the modal window itself?

Thanks,

Laiwu

Posted April 24th, 2007 at 9:17am by lluo

Unfortunately this is a browser level issue. Normal iframe usage works fine, but there are a variety of circumstances which will trigger cross domain issues. It sucks, but the only workable solution I find consistently works, is to write a proxy script on your own server. In PHP:

print file_get_contents($_GET['url']);

Call this script with the URLs you want to fetch. Ugly as hell, but it works.

Posted April 26th, 2007 at 9:29am by ryan

Login or Register to Post