472,983 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

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 6677
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
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...
4
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...
2
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...
1
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...
7
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+...
3
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...
0
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...
1
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...
1
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...
23
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.