Access denied using location.reload function

G

Guest

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 =
'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollYesNo+',resizable';
win = window.open(pageURL, winName, winprops);
if (win != null) {
if (win.opener == null) {
win.opener = self;
}
}
win.focus();
}

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

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

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?
 
B

bruce barker

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

-- bruce (sqlwork.com)
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top