0

I found some code to open a link in a new window, and then change the current window to something new as well. This works fine in Firefox, but testing it in IE8 doesn't work.

<SCRIPT type="text/javascript">
function poptastic(url)
{
        newwin=window.open(url,'name','top=0,left=0,resizable=1,scrollbars=1');
        newwin.moveTo(0,0);
        newwin.resizeTo(newwin.screen.availWidth, newwin.screen.availHeight);
        if (window.focus) {newwin.focus()}
        window.location = "thankyou.php";

}
</script>

and for the link:

<input id="submit1" name="submit1" type="button" onClick="javascript:poptastic('http://www.google.com');" value="Continue" /></div>

In IE8 it doesn't change the old window, the new window doesn't open full screen, and it shows an error: Access is denied.

However if I change the url to a local page like:

<input id="submit1" name="submit1" type="button" onClick="javascript:poptastic('newwindow.php');" value="Continue" /></div>

it works fine. It's only when specifying a page outside my domain it causes problems. Any ideas?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by genki01
0

You are not supposed to access other domain because of security issue. This is just prevent you from hacking/attacking other site on purpose (doesn't mean it is a guarantee but for most of it).

0

Is there anything I can set to allow this, as I own both domains?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.