473,399 Members | 2,478 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,399 software developers and data experts.

cannot reference window.location.href

Hello,

I'm a JavaScript newbie with a serious headache. The following routine generates the following error

Error: uncaught exception: Permission denied to get property Location.href

var spawnWindow;
function openSpawnWindow( url )
{
if( !spawnWindow || spawnWindow.closed )
{
spawnWindow = window.open(url,'spawnWin');
}
else
{
if( spawnWindow.location.href != url )
{
spawnWindow.location.href = url;
}
}
}

Invoked in body

<a href="javascript:openSpawnWindow('http://www.cycleforautism.com')">Cycle for Autism</a>

Windows XP, SP1
Mozilla 1.5, Firebird 0.7, MS IE 6.1

Please show me the errors of my ways.

Yours truly,
Ted
Jul 20 '05 #1
2 6833
Lee
ShinCat said:

This is a multi-part message in MIME format.
Please post only plain text to this newsgroup.

I'm a JavaScript newbie with a serious headache. The following routine =
generates the following error

Error: uncaught exception: Permission denied to get property =
Location.href


It would be a security violation to allow one web page to
read any property of another web page that's opened from a
different domain.

Jul 20 '05 #2
Thanks for the answer. Is this being caused due to authoring on a local
host? I'm running XP Pro with built in IIS running . I wrote the JavaScript
so no more than one window would be spawned from a Web page full of other
links. What does the browser see in terms of two domains?

All your assistance much appreciated,
Ted.

"Lee" <RE**************@cox.net> wrote in message
news:bp*********@drn.newsguy.com...
ShinCat said:

This is a multi-part message in MIME format.


Please post only plain text to this newsgroup.

I'm a JavaScript newbie with a serious headache. The following routine =
generates the following error

Error: uncaught exception: Permission denied to get property =
Location.href


It would be a security violation to allow one web page to
read any property of another web page that's opened from a
different domain.

Jul 20 '05 #3

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

Similar topics

5
by: Carol Lyn | last post by:
Could use your assistance with this. I have a window that opens via onclick and it is a small window with info about a site. If the user is interested in visiting that site, there is a link to...
3
by: sentinel | last post by:
Hi all, I'm trying to reload a frame from a pop-up, but really cannot figure this out. Within my index.htm file, I make a link to call a pop-up frame with a javascript function that calls the...
5
by: Mike | last post by:
In my previous post, I wrote: > ... > GOAL: (very simple) Provide a hyperlink which, when clicked, > calls a javascript function which opens a new URL. > ... > PROBLEM: The following code...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
3
by: saiho.yuen | last post by:
Hi, Is anyone know what is the difference between Location.href and Window.location.href Thanks you very much:) Saiho
5
by: Tim Streater | last post by:
I have this arrangement of frames: <html><head><script type="text/javascript"></script></head> <frameset rows="100,*"> <frameset cols="135,*,165"> <frame name="logo" src="some.html"...
3
by: Christian Hubinger | last post by:
Hi! I'm working on a page that uses javascript very much. My problem is now that i cannot redirect to another page in IE with window.location =<URL>; This command gets executed (proofed with...
2
by: Robert Degen | last post by:
Hello, I got a little problem. Seems very simple: * I want to open a popup window * Popup-window uses data from its father window. BUT a parent.window does NOT point to the real parents...
5
by: soni2926 | last post by:
Hi, I have a pop up window, that window needs to refresh the parent window when opened, I'm doing the following: window.opener.location.href(window.opener.location.href); problem I'm having...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.