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

Why can't I do string manipulation on location.href?

Hi,

I keep getting the error, "Error: uncaught exception. Permission
denied to get property Location.href" when executing this function:

function checkUpperFrame() {
var l = top.frames['login'].location.href;
if (l.indexOf("teacher_hub") == -1) {
setTimeout(checkUpperFrame, 100);
} else {

top.location.replace("http://my-stage.hrw.com/support/file_portal/");
} // if
} // checkUpperFrame

Why am I getting this error and what can i do to correct it?

Thanks, - Dave

Jul 27 '06 #1
1 1794
la***********@zipmail.com wrote:
I keep getting the error, "Error: uncaught exception. Permission
denied to get property Location.href" when executing this function:

function checkUpperFrame() {
var l = top.frames['login'].location.href;
<snip>

Presumably the page loaded into - top.frames['login'] -, or into - top
- is not from the same domain as the page on which the script is
executing.

Richard.

Jul 27 '06 #2

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

Similar topics

2
by: Goran Petrovic | last post by:
I wrote a vb function, but i need it i jaavscript..i know java sintax but am not sure how to make it work. this extracts teh file name from a path...i thought strcpy..or something..but dont really...
14
by: SyrOrange | last post by:
I am trying to send two values to a page, this is very similar to a previous post that I saw on this newsgroup, not sure if it was resolved or not. "Results.ASP" exists, I am thinking there is...
5
by: Phil | last post by:
hello I am a trying to find the text between a ? mark and an = sign: var theData; var begin; var thePageNo; var beginFrom; beginFrom = top.location.href.indexOf("="); begin =...
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
8
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
4
by: news-server.tampabay.rr.com | last post by:
Hi, Below is a stock script I found which controls a framed environment. My problem is that if a URL has a query string attached, that string does not pass through. Can someone please let me...
4
by: Keith Smith | last post by:
Is there a javascript variable that contains the path of the file from which it ran? Something like this....? alert('My path=' + MyURLPath); Is this possible?
17
by: JRough | last post by:
I have used this function to create a string called $headers: function GetHeaders($file_name){ return "<th><a href='".$file_name."&order_by=l_e'>L_E</a></th> <th><a...
3
by: smokymtnman | last post by:
I have a drop down menu that has grown so long that I am afraid it will be hidden at the bottom of the page. I am using a ssi file for navigation. I was wondering if I can use the same code but...
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: 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
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
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,...
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...

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.