Access denied using location.reload function



I am having an interesting problem where I am simply trying to put in
country selection popup window on my site. When the user closes the window
the popup should call the window.opener.location.reload(true) function and
show the newly selected country. Well, when I try it from my MAC box I get an
Access denied error but when I do it from my IIS box it works.

Both environments are using the same exact function to open the popup. In
fact they are both opening the same popup on my IIS box. I can't seem to
figure out why this would be happening.

Here is my script for both the calling and popup pages.

//popup open function
function centerPopup(pageURL, winName, w, h, scrollYesNo) {
// new window utility
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
var winprops =
win =, winName, winprops);
if (win != null) {
if (win.opener == null) {
win.opener = self;

//calling pages both have this exact same link
<A CLASS="subnav"
ONCLICK="centerPopup(this.href, 'Country', '400', '300', 'no');return
HREF="">Change Country</A>

//and finally, the Refresh code from the popup
function RefreshParent(){
if (window.opener.location){
//this is where the error occurs

From my calling function I have been able to determine that the
opener.location is populating but for some reason when it comes from my MAC
box it's not accessible.

Is this by design? If so, how do I get around it?

bruce barker

the domain name (part of the url) between the opener and the pop must match.

-- bruce (

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question