473,503 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using javascript to detect frame source

*** post for FREE via your newsreader at post.newsfeed.com ***

I am trying to write a small script that will detect the url of a frame.
Here is my scenario.

I have two frames. "Top" contains a local file on my server with the
aforementioned javascript. "Bottom" is a remote website on a server I
do not control. I want to use javascript in "Top" to determine what the
current url is in the "bottom" frame.

How do I do this?

Thank you,

Marty Martin
ne**@croakingtoad.com
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----

Jul 23 '05 #1
1 2032
Marty Martin wrote:
I have two frames. "Top" contains a local file on my server with the
aforementioned javascript. "Bottom" is a remote website on a server I
do not control. I want to use javascript in "Top" to determine what
the current url is in the "bottom" frame.


Same Origin Policy will prevent you from retrieving the URL, unless you
either use signed script in Geckos, or enable the UniversalBrowserRead
privilege for a script loaded from a file: location in Geckos, or the
browser security settings are configured to "Access data sources across
domains" in MSIE, or the script is part of a HTML Application in MSIE,
or you are using an aquivalent feature of your user agent.

If you've worked around SOP, use `top.frames["Bottom"].location.href´.

ciao, dhgm

Jul 23 '05 #2

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

Similar topics

2
2964
by: news frontiernet.net | last post by:
I have key entered and tried to run example 4-6 from Dany Goodmans DYNAMIC HTML book, version one that is on pages 94-96. This is part of my effort to learn JavaScript. I checked each byte and...
3
3200
by: Dany P. Wu | last post by:
Hi everyone, I am trying to create a site with pages containing iframes. This is the first time I've used inline frames and am still struggling with the concept. This site will have 10 pages...
4
3816
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
9
4497
by: CW | last post by:
I wrote an HTML based chat application. The front end is built entirely on HTML + javascript. Essentially, I have a hidden frame that's refreshed frequently and any new messages are displayed in...
1
1868
by: clemenr | last post by:
Hi. I would like to know if the following is feasible in JavaScript. I would create a frameset where the top frame includes JavaScript. The bottom frame would be directed to the login page of an...
1
18857
by: plex4r | last post by:
I am using iFrames to integrate two systems at the HTML level. If the included content in an iFrame is not available, how can I detect this in the outer page in JavaScript? Thanks, plex4r
5
2061
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
18
7312
by: William | last post by:
I have the following javascript function that updates a scroll_list and sends the updated entry (with its index) to a server script ( i.e. http://mkmxg00/cgi/confirmUpload.pl ) for further...
3
2830
by: rajarya | last post by:
Hi, I m designing a HTML page(index.html),here i have 2 frames,by defult both frames have index1.html and index2.html as their source . in first frame(index.html) ,i have some redio buttons,and a...
0
7198
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
7271
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
7319
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
7449
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...
1
4998
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
4666
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
3160
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
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
373
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.