473,395 Members | 1,677 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.

iFrame src return with an onLoad

I'm trying to get the src of an iFrame whenever it calls the onLoad but
for some reason it only brings up the first url that the src was set
to.

Any help would be appreciated.

Dec 24 '06 #1
4 1932
wrote on 24 dec 2006 in comp.lang.javascript:
I'm trying to get the src of an iFrame whenever it calls the onLoad but
for some reason it only brings up the first url that the src was set
to.
You will have to explain better what you are trying to do.
Add some of your code,
only the part that shows what you want and don't get.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 24 '06 #2
Br*********@gmail.com escreveu:
I'm trying to get the src of an iFrame whenever it calls the onLoad but
for some reason it only brings up the first url that the src was set
to.
I tested on IE and FF, on both it worked fine (brought the current url).
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Dec 24 '06 #3
Well here is my code : http://www.brentalan.com/test/test.html and I
can't get it to work at all. There must be something I am missing.

-Brent

Jonas Raoni wrote:
Br*********@gmail.com escreveu:
I'm trying to get the src of an iFrame whenever it calls the onLoad but
for some reason it only brings up the first url that the src was set
to.

I tested on IE and FF, on both it worked fine (brought the current url).
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Dec 24 '06 #4
Br*********@gmail.com escreveu:
Well here is my code : http://www.brentalan.com/test/test.html and I
can't get it to work at all. There must be something I am missing.
Hmmm, the src property of the <iframeisn't really updated :b

The following snippets work:

<iframe onload="alert(this.contentWindow.location.href);" ...>

Or

<iframe name="ABC" onload="alert(frames['ABC'].location.href);" ...>
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Dec 24 '06 #5

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

Similar topics

2
by: Rich | last post by:
Is there any way I can check to see if a document is loaded into the iframe before I call onLoad (sort of an afterLoad). I'm loading up a page into an iframe. But because we use four servers...
4
by: Mark | last post by:
I am loading source files into several iframes, with each load happening after some user-generated event (like clicking a button). The loading works but I need to determine when the source file is...
3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
6
by: ok | last post by:
<img src="http://www.6park.com/enter2/av.gif" onload="document.write('an iframe obj');"> First of all, it destroy the HTML page. Secondly even if it does not destroy it, the iframe object will...
3
by: Greg | last post by:
Javascript Folks, I am relatively new to javascript and am working on a script where I want to utilizes a couple of iframes and format text in them. I have run into a problem with getting the...
3
by: Asterbing | last post by:
Since the "on fly addition..." thread has taken another direction, I'm opening a new one to be more explicit and recenter the subject. Well, the subject is to detect when a document is well...
4
by: Drew | last post by:
This might beyond the scope of this group because it deals with SharePoint, but I'm not sure if I can't get it to work because of SharePoint or because JavaScript is weird (I don't have much...
7
by: Tom Cole | last post by:
IFrames have been used by years for people to accomplish many of the tasks the XMLHttpRequest does for them now...I unfortunately am late in the game and XMLHttpRequest was already out there by the...
2
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to...
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: 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:
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
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...
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.