473,516 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get IFRAME url

Hi.

I have a strange problem wuth IFRAME.

I have page aaa.aspx with an IFRAME that contain page bbb.aspx.

page bbb.aspx sometimes redirect him self to page ccc.aspx.

The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).

What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.

I know it complex but I really hope you can help me.

Thanks.

Jan 25 '07 #1
7 6717
So using redirect could well perhaps change the document location but leave
src unchanged (after all you didn't tell the parent frame the location
should be changed).

So something that could work would be to get the document.location for this
document rather than using the src attribute of its parent frame.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@s48g2000cws.googlegroups.c om...
Hi.

I have a strange problem wuth IFRAME.

I have page aaa.aspx with an IFRAME that contain page bbb.aspx.

page bbb.aspx sometimes redirect him self to page ccc.aspx.

The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).

What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.

I know it complex but I really hope you can help me.

Thanks.

Jan 25 '07 #2
Hi Patrice,

Thanks for the reply.
The question is how can I get the location of the page inside the
IFRAME?

I didn't saw any way to get the location of the real document inside
the IFRAME?

Thanks.
Patrice כתב:
So using redirect could well perhaps change the document location but leave
src unchanged (after all you didn't tell the parent frame the location
should be changed).

So something that could work would be to get the document.location for this
document rather than using the src attribute of its parent frame.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@s48g2000cws.googlegroups.c om...
Hi.

I have a strange problem wuth IFRAME.

I have page aaa.aspx with an IFRAME that contain page bbb.aspx.

page bbb.aspx sometimes redirect him self to page ccc.aspx.

The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).

What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.

I know it complex but I really hope you can help me.

Thanks.
Jan 25 '07 #3
Try ifrm.document.location.href, ifrm being the ID of your IFRAME tag...

--
Patrice

"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@q2g2000cwa.googlegroups.c om...
Hi Patrice,

Thanks for the reply.
The question is how can I get the location of the page inside the
IFRAME?

I didn't saw any way to get the location of the real document inside
the IFRAME?

Thanks.
Patrice ???:
So using redirect could well perhaps change the document location but
leave
src unchanged (after all you didn't tell the parent frame the location
should be changed).

So something that could work would be to get the document.location for
this
document rather than using the src attribute of its parent frame.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@s48g2000cws.googlegroups.c om...
Hi.

I have a strange problem wuth IFRAME.

I have page aaa.aspx with an IFRAME that contain page bbb.aspx.

page bbb.aspx sometimes redirect him self to page ccc.aspx.

The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).

What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.

I know it complex but I really hope you can help me.

Thanks.

Jan 25 '07 #4
Damn, It look good for a moment :(

I tried it but in internet explorer it return me the url of the parent
page (aaa.aspx) and not bbb or ccc.

In fire fox nothing happen :(

any more ideas?

Thanks.

Patrice wrote:
Try ifrm.document.location.href, ifrm being the ID of your IFRAME tag...

--
Patrice

"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@q2g2000cwa.googlegroups.c om...
Hi Patrice,

Thanks for the reply.
The question is how can I get the location of the page inside the
IFRAME?

I didn't saw any way to get the location of the real document inside
the IFRAME?

Thanks.
Patrice ???:
So using redirect could well perhaps change the document location but
leave
src unchanged (after all you didn't tell the parent frame the location
should be changed).

So something that could work would be to get the document.location for
this
document rather than using the src attribute of its parent frame.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@s48g2000cws.googlegroups.c om...
Hi.
>
I have a strange problem wuth IFRAME.
>
I have page aaa.aspx with an IFRAME that contain page bbb.aspx.
>
page bbb.aspx sometimes redirect him self to page ccc.aspx.
>
The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).
>
What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.
>
I know it complex but I really hope you can help me.
>
Thanks.
>
Jan 25 '07 #5
Tried it on IE6/FF2 and works here.

There is two problem :
1) - for cross browser code use window.frames[0].location

2) I'm not sure why you don't have the correct result in IE. I tried :
- a first page "a.asp" that includes a "b.asp" page using an iframe
- the "b" page redirects to the "c" page

I addeed a button on the "a" page to display the info once the page is
loaded.

In both browser I see that the src attribute still point to the "b" page
while window.frames[0].location gives the "c" page location...

Good luck.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@v33g2000cwv.googlegroups. com...
Damn, It look good for a moment :(

I tried it but in internet explorer it return me the url of the parent
page (aaa.aspx) and not bbb or ccc.

In fire fox nothing happen :(

any more ideas?

Thanks.

Patrice wrote:
Try ifrm.document.location.href, ifrm being the ID of your IFRAME tag...

--
Patrice

"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@q2g2000cwa.googlegroups.c om...
Hi Patrice,

Thanks for the reply.
The question is how can I get the location of the page inside the
IFRAME?

I didn't saw any way to get the location of the real document inside
the IFRAME?

Thanks.
Patrice ???:
So using redirect could well perhaps change the document location but
leave
src unchanged (after all you didn't tell the parent frame the location
should be changed).

So something that could work would be to get the document.location for
this
document rather than using the src attribute of its parent frame.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@s48g2000cws.googlegroups.c om...
Hi.
>
I have a strange problem wuth IFRAME.
>
I have page aaa.aspx with an IFRAME that contain page bbb.aspx.
>
page bbb.aspx sometimes redirect him self to page ccc.aspx.
>
The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).
>
What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.
>
I know it complex but I really hope you can help me.
>
Thanks.
>

Jan 26 '07 #6
Hi Patrice,

I don't understand how you made it work.
I tried to use window.frams[0].location but I got "access denied"
error.
I think I read some where that there is some sort of security
protection on iframe :(

I really don't understand this.
may be it because you used asp while I use aspx?

Any way, I tried every solution I can think of and I tried to check
every properties for the "window" properties and its just didn't work.

very strange if you say that it worked fine for you.

I'll try to investigate it some more.

Any way, I really appreciate your help!
It helped me alot.

Roy.

Patrice כתב:
Tried it on IE6/FF2 and works here.

There is two problem :
1) - for cross browser code use window.frames[0].location

2) I'm not sure why you don't have the correct result in IE. I tried :
- a first page "a.asp" that includes a "b.asp" page using an iframe
- the "b" page redirects to the "c" page

I addeed a button on the "a" page to display the info once the page is
loaded.

In both browser I see that the src attribute still point to the "b" page
while window.frames[0].location gives the "c" page location...

Good luck.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@v33g2000cwv.googlegroups. com...
Damn, It look good for a moment :(

I tried it but in internet explorer it return me the url of the parent
page (aaa.aspx) and not bbb or ccc.

In fire fox nothing happen :(

any more ideas?

Thanks.

Patrice wrote:
Try ifrm.document.location.href, ifrm being the ID of your IFRAME tag...

--
Patrice

"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@q2g2000cwa.googlegroups.c om...
Hi Patrice,

Thanks for the reply.
The question is how can I get the location of the page inside the
IFRAME?

I didn't saw any way to get the location of the real document inside
the IFRAME?

Thanks.
Patrice ???:
So using redirect could well perhaps change the document location but
leave
src unchanged (after all you didn't tell the parent frame the location
should be changed).
>
So something that could work would be to get the document.location for
this
document rather than using the src attribute of its parent frame.
>
>
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@s48g2000cws.googlegroups.c om...
Hi.

I have a strange problem wuth IFRAME.

I have page aaa.aspx with an IFRAME that contain page bbb.aspx.

page bbb.aspx sometimes redirect him self to page ccc.aspx.

The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).

What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.

I know it complex but I really hope you can help me.

Thanks.
Jan 28 '07 #7
This is client side so using ASP or ASPX doesn't make a difference.

Does your iframe goes on the same domain. I used a path such "/b.asp"...
Patrice

"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@v33g2000cwv.googlegroups.c om...
Hi Patrice,

I don't understand how you made it work.
I tried to use window.frams[0].location but I got "access denied"
error.
I think I read some where that there is some sort of security
protection on iframe :(

I really don't understand this.
may be it because you used asp while I use aspx?

Any way, I tried every solution I can think of and I tried to check
every properties for the "window" properties and its just didn't work.

very strange if you say that it worked fine for you.

I'll try to investigate it some more.

Any way, I really appreciate your help!
It helped me alot.

Roy.

Patrice ???:
Tried it on IE6/FF2 and works here.

There is two problem :
1) - for cross browser code use window.frames[0].location

2) I'm not sure why you don't have the correct result in IE. I tried :
- a first page "a.asp" that includes a "b.asp" page using an iframe
- the "b" page redirects to the "c" page

I addeed a button on the "a" page to display the info once the page is
loaded.

In both browser I see that the src attribute still point to the "b" page
while window.frames[0].location gives the "c" page location...

Good luck.
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@v33g2000cwv.googlegroups. com...
Damn, It look good for a moment :(

I tried it but in internet explorer it return me the url of the parent
page (aaa.aspx) and not bbb or ccc.

In fire fox nothing happen :(

any more ideas?

Thanks.

Patrice wrote:
Try ifrm.document.location.href, ifrm being the ID of your IFRAME tag...

--
Patrice

"nicknack" <ro******@gmail.coma écrit dans le message de news:
11**********************@q2g2000cwa.googlegroups.c om...
Hi Patrice,

Thanks for the reply.
The question is how can I get the location of the page inside the
IFRAME?

I didn't saw any way to get the location of the real document inside
the IFRAME?

Thanks.
Patrice ???:
So using redirect could well perhaps change the document location but
leave
src unchanged (after all you didn't tell the parent frame the location
should be changed).
>
So something that could work would be to get the document.location for
this
document rather than using the src attribute of its parent frame.
>
>
"nicknack" <ro******@gmail.coma écrit dans le message de news:
11*********************@s48g2000cws.googlegroups.c om...
Hi.

I have a strange problem wuth IFRAME.

I have page aaa.aspx with an IFRAME that contain page bbb.aspx.

page bbb.aspx sometimes redirect him self to page ccc.aspx.

The problem is that after I loaded the aaa.aspx page I want to know
what page do I see in the IFRAME. (aaa or bbb).

What I've tried to do is to run a JS in the onLoad of aaa.aspx that
after 5 seconds get the "src" property of the IFRAME but I saw that
even if bbb.aspx redirect to ccc.aspx the source is still bbb.aspx.

I know it complex but I really hope you can help me.

Thanks.

Jan 29 '07 #8

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

Similar topics

2
9344
by: Csaba2000 | last post by:
I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated. Challenge: I'd like the alert box to show: Mom said, "Don't" instead of the current: Mom said, "Do not". The point of the exercise is that I will be passing arbitrary strings to the...
4
7598
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I fill the iframe with content (<body> tag and so on and also insert a <div> tag, inbetween is the content that should be modified). Now if the...
2
47296
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe snipplet: //************************************* //*************************************
1
24575
by: Martin | last post by:
There seems to be some strange behaviour when trying to get the scrollHeight and scrollTop of an iframe in IE6. I have tried several ways of getting these values when the iframe is written into the html. The following return the correct values in IE6, where the iframe's id is 'f': f.document.body.scrollHeight f.document.body.scrollTop...
7
4830
by: Christopher J. Hahn | last post by:
I'm trying to use a script-generated form to submit to a script-generated iframe. The problem I'm running into is that the iframe is not assuming the name I assign it. IE6 on Win2000. FF1.0.2+ doesn't seem to have the problem. I'm doing: this.iframe = document.createElement( 'iframe' ); this.iframe.id = this.id + 'wh';...
3
8124
by: Angel | last post by:
How do I get the reference of the IFrame from the asp.net webpage that is being displayed within that IFrame? In other words I have an IFrame in my page. Within that IFrame Set the source to a different asp.net page. I want on that page that is within the IFrame to be able to access the IFrame object. How can that be done? Besides the...
0
7755
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet explorer but not on firefox. I dont want it to scroll sideways. in index.htm the iframe is at the bottom of the code. index.htm <!DOCTYPE...
1
8114
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible to gradually zoom an iframe, and if so, what am I missing? Here is the script I am trying to manipulate, between the head tags: <script...
1
4873
by: cdmsenthil | last post by:
I have an Infragistics UltrawebGrid . Each Row in the grid is attached to a context menu using Infragistics CSOM Upon click on the menu, I am creating an Iframe dynamically which points to another page in the same domain which also contains infragistics datagid populated with default data retrieved from Data Base. After creating the frame I...
23
6541
by: vunet | last post by:
It is recommended by some sources I found to create IFrames in IE using document.createElement('<iframe src="#">') instead of document.createElement('iframe'). Why and what browser versions to use it? IE5 or IE6? Thanks
0
7408
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. ...
0
7581
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...
0
7548
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5714
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...
1
5110
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3267
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...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
488
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...

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.