473,395 Members | 1,863 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,395 software developers and data experts.

Fetching latest URL of a frame...

Hi all,

I'm trying to get the latest URL that a user visited in the frame.
But it just doesn't work.

function setURL() {
//document.cc.fm.URL.value=document.main.location.hr ef;
alert("onLoad");
alert("Page "+document.frames[0].location.href+" is loaded");

}
......

<FRAMESET rows="*,40%" >
<FRAME src="about:blank" name="main" onChange="setURL();">
<FRAME src="cc.html" name="cc">

What's the problem?
Jul 23 '05 #1
2 1915


hunglm wrote:

I'm trying to get the latest URL that a user visited in the frame.
But it just doesn't work.

function setURL() {
//document.cc.fm.URL.value=document.main.location.hr ef;
alert("onLoad");
alert("Page "+document.frames[0].location.href+" is loaded"); <FRAME src="about:blank" name="main" onChange="setURL();">


Who (or which documentation) told you that there is an onchange event
handler for <frame> elements? That handler attribute doesn't exist.
Some browsers (IE5.5/6, Netscape 7, Mozilla, latest Opera (7.5x) support
<frame onload="..." src="whatever.html">
so that handler could help but I am not sure whether Safari, Konqueror
and older Opera 7.xy support that.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Martin Honnen <ma*******@yahoo.de> wrote in message news:<41***********************@newsread4.arcor-online.net>...
hunglm wrote:

I'm trying to get the latest URL that a user visited in the frame.
But it just doesn't work.

function setURL() {
//document.cc.fm.URL.value=document.main.location.hr ef;
alert("onLoad");
alert("Page "+document.frames[0].location.href+" is loaded");

<FRAME src="about:blank" name="main" onChange="setURL();">


Who (or which documentation) told you that there is an onchange event
handler for <frame> elements? That handler attribute doesn't exist.
Some browsers (IE5.5/6, Netscape 7, Mozilla, latest Opera (7.5x) support
<frame onload="..." src="whatever.html">
so that handler could help but I am not sure whether Safari, Konqueror
and older Opera 7.xy support that.


Uh...
Well , thanks, but that's not the point for me. My problem is why

alert("Page "+document.frames[0].location.href+" is loaded");

doesn't work. "onChange=..." is orginally "onLoad=..." , I'm sorry for
that but it just worked for me.
Thanks.
Jul 23 '05 #3

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

Similar topics

14
by: Arsen V. | last post by:
Hello, How does an application like the Web Application Stress tool work? How does it issue requests so fast without being blocked by slow executing ones? What technique can I use to create an...
1
by: Srinivasan R | last post by:
Hi, I am trying to get asynchronous fetching of data from sql server database. I would like to show the progress of fetching records in GUI. Is there any simple/complex steps for the same in C#...
0
by: Shujun Huang | last post by:
Hi, I am working on converting Informix database to Postgre. I have one question for fetching records using PostgreSQL. The record I am fetching is a variable size text string. Before fetching...
1
by: deepdata | last post by:
Hi, I am trying to fetch data from db2 (express version) database by calling stored procedure. I have tried to use both cursor and for loop but still i am getting error. --======Start...
7
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which...
22
by: Sandman | last post by:
So, I have this content management system I've developed myself. The system has a solid community part where members can register and then participate in forums, write weblogs and a ton of other...
5
by: Bhavesh | last post by:
Hello genious people, I m trying to insert a LARGE text from Multiline Textbox into my table of sqlserver2000. I m using vs-2005. Please note that I dont want to store blob data From FILE...
1
by: Bhavesh | last post by:
Hi Bruce, Thanks For Reply. U were right, Needed to pass string , but also need to pass size of Data( instead of 16, passed actual length of data). So that worked for me & didn't get any...
2
by: SunshineInTheRain | last post by:
I'm trying to modify a long long code within a button click by make the insert/update/delete/select using the same transaction. Purpose is to make sure every operation can be rollback instead of some...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
0
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...
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...

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.