473,652 Members | 3,045 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("tea cher_hub") == -1) {
setTimeout(chec kUpperFrame, 100);
} else {

top.location.re place("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 1801
la***********@z ipmail.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
2792
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 know. Please help function GetWriterName str=document.location for i = len(str) to 1 step -1 if mid(str,i,1)="/" then
14
1418
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 something wrong with my syntax. onchange="parent.usbWindow.location.href='connector1=<%=cnt1%>&Results.asp?T ype='+this.value;" Thank you
5
3370
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 = top.location.href.indexOf("?"); if (begin > 0 )
3
50399
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
8219
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) { document.location.href = document.location.href.substring(0, document.location.href.indexOf('#')) + '?' + newUrl; } else { document.location.href = document.location.href + '?' + newUrl; }
4
4808
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 know if and hopefully how, it will be possible to carry a query string through? This first part here is in the default.asp framed page. <SCRIPT LANGUAGE="JavaScript">
4
22872
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
2303
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 href='".$file_name."&order_by=carnumber'>Carnumber</a></th> <th><a href='".$file_name."&order_by=location'>Location</a></th> <th><a href='".$file_name."&order_by=sighting_date_asc'>Sighting Date</a></th> <th><a href='".$file_name."&order_by=classification'>Code</a></th>...
3
2053
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 break it into two columns. The site is: http://www.fabserv.com/ The code for navigation.ssi is pasted below:
0
8811
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...
0
8703
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8467
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
7302
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...
0
5619
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();...
0
4145
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1591
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.