473,508 Members | 2,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access denied for location?

Hi,

For some reason, when I create a new window using "myWin =
window.open(url)", and then try to get the location of the window using
"alert(myWin.location)", it tells that access is denied. How can it be
denied...it's a window I created...therefore, shouldn't I have access to
it's location property?

Thanks,
Aaron
Jul 20 '05 #1
4 2303
In article <1f********************@comcast.com>, ag********@comcast.net
says...
Hi,

For some reason, when I create a new window using "myWin =
window.open(url)", and then try to get the location of the window using
"alert(myWin.location)", it tells that access is denied. How can it be
denied...it's a window I created...therefore, shouldn't I have access to
it's location property?


The domain in the newly opened window is different from that of the
original window.

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Jul 20 '05 #2
If the document in the window is not in the same domain then you can't
access it.
This is a security/privacy issue.
http://msdn.microsoft.com/library/de...g_security.asp

Tim
"Aaron" <ag********@comcast.net> wrote in message
news:1f********************@comcast.com...
Hi,

For some reason, when I create a new window using "myWin =
window.open(url)", and then try to get the location of the window using "alert(myWin.location)", it tells that access is denied. How can it be denied...it's a window I created...therefore, shouldn't I have access to it's location property?

Thanks,
Aaron

Jul 20 '05 #3
I understand what you're saying about security...but I'm reading O'Reilly's
javascript: The Definitive Guide to learn this (which is supposedly a good
book), and there's a specific example where the location of another window
(another frame in the same set) is obtained and written into the a text box
of the current document. Why would this even be written if it's not
possible?
Also, I get the access denied message when I try to use a self-created "back
button" in one frame to control another frames location via it's history
object. This is in the book too, and it should work. Any ideas?

Thanks,
Aaron
Jul 20 '05 #4

"Aaron" <ag********@comcast.net> wrote in message
news:Ps********************@comcast.com...
I understand what you're saying about security...but I'm reading O'Reilly's javascript: The Definitive Guide to learn this (which is supposedly a good
book), and there's a specific example where the location of another window
(another frame in the same set) is obtained and written into the a text box of the current document. Why would this even be written if it's not
possible?
You believe *everything* you read?
Also, I get the access denied message when I try to use a self-created "back button" in one frame to control another frames location via it's history
object. This is in the book too, and it should work. Any ideas?


The book is wrong.
Jul 20 '05 #5

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

Similar topics

4
3883
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following...
0
1618
by: phancey | last post by:
whoops - I should have posted this to CSharp not ASPNET: Hi, I am using a 3rd party product to create dynamic web service proxies (downloaded from www.thinktecture.com). My problem is that...
7
4758
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...
3
4033
by: Shailesh Gajare | last post by:
Hi All, I have creating an ASP.Net application with two web servers. I am uploading a file which is being uploaded on one of the server, I want to copy the uploaded file on the other server at the...
4
3988
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
21683
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
3450
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...
8
6032
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
3927
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was...
0
7224
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
7120
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...
1
7039
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...
1
5050
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...
0
4706
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...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
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 ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.