473,651 Members | 2,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.l ocation.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(pag eURL, winName, w, h, scrollYesNo) {
// new window utility
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
var winprops =
'height='+h+',w idth='+w+',top= '+wint+',left=' +winl+',scrollb ars='+scrollYes No+',resizable' ;
win = window.open(pag eURL, 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="center Popup(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.l ocation.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 2497
the domain name (part of the url) between the opener and the pop must match.

-- bruce (sqlwork.com)

"ENIZIN" <EN****@discuss ions.microsoft. com> wrote in message
news:C4******** *************** ***********@mic rosoft.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.l ocation.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(pag eURL, winName, w, h, scrollYesNo) {
// new window utility
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
var winprops =
'height='+h+',w idth='+w+',top= '+wint+',left=' +winl+',scrollb ars='+scrollYes N
o+',resizable'; win = window.open(pag eURL, 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="center Popup(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.l ocation.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****@discuss ions.microsoft. com> wrote in message
news:C4******** *************** ***********@mic rosoft.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.l ocation.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(pag eURL, winName, w, h, scrollYesNo) {
// new window utility
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
var winprops =

'height='+h+',w idth='+w+',top= '+wint+',left=' +winl+',scrollb ars='+scrollYes N
o+',resizable';
win = window.open(pag eURL, 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="center Popup(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.l ocation.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
1896
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, the iFrame gives me the ablity to have a scrolling table of results that doesn't fill up the whole screen when a lot of data is present. when I read in the main page, the src of the iframe is set to a URL like...
6
2582
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
6083
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 variable s into the new window. Sometimes, it writes successfully, while other times the popup error is "access denied". How to solve this problem? thanks ____________________________ function setup(){ var w =
1
2249
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 OpenLink(Link){
5
2210
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
4768
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 error occurs in both installations. When I do a compile/build of my app and go to the browser and hit reload there comes an error:
4
4000
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 = (window.screen.availWidth/2)+130; width2 = (window.screen.availWidth/2)-130; height = (window.screen.availheight);
4
21716
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 webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
6
3459
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 am trying to access the frame in different domain.is there any way to tackle this problem my code: parent frame: <html> <script> function displayURL(){ alert("child frame URL="+self.childframe1.location.href);
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8795
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.