473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 =
'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?
Nov 18 '05 #1
2 2483
the domain name (part of the url) between the opener and the pop must match.

-- bruce (sqlwork.com)

"ENIZIN" <EN****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
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='+scrollYesN
o+',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?

Nov 18 '05 #2
They are both on the same domain however, one is a sub domain... we have
www.domain.com and www2.domain.com. That sucks.

Thanks.

"bruce barker" wrote:
the domain name (part of the url) between the opener and the pop must match.

-- bruce (sqlwork.com)

"ENIZIN" <EN****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
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='+scrollYesN
o+',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?


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve | last post by:
This really surprised me. I setup an iFrame in my document to display data from another table. For me, this was a way to be able to update that data without having to reload the whole page. Also,...
6
by: Salty Dog | last post by:
Code: <%Response.Buffer = False%> <HTML> <HEAD> <title>Printing</title> </HEAD> <BODY> <center> <% FilePath = "c:\WUTemp\441817810_receiver.txt"
2
by: Wang, Jay | last post by:
I try to open up a window with window.open in javascript. "domain.html" contains domain information 'domain.school.edu'. The "Access denied" problem happens when document.write is trying to put...
1
by: | last post by:
Hello, I have a problem when I try to do this on a aspx page.. Is there anything wrong with this approach? This is the javascript function <Script Language='JavaScript'> function...
5
by: Gene | last post by:
What are some ways I can deny access to an aspx page other than removing it altogether from the site? I need the ability to temporarily prevent all users from accessing certain pages. Thanks.
7
by: Martin Strojek | last post by:
Hi, I have the following problem with developing some web site. I use Visual Studio 2003 to build a website. I tried Windows 2003 Server and switched now back to Windows XP with PWS but the...
4
by: Chrisser | last post by:
Hi I have an Intranet webpage starting with a mainpage from which the user can open a new window using a link that is calling a function: function openWindows(){ var left, top; width =...
4
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a...
6
by: suresh_nsnguys | last post by:
Hi, This is my first message to this forum.I am facing one problem in frames.when i am trying to access child frame from parent frame i am getting "Access Denied Error".i know the reason bcz i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.