IFrame URL after server-side redirect

S

saber850

Hi,

I have an IFrame in a page. Yada, yada, yada, the IFrame's page is
changed via:
document.getElementByID('frameName').src = "NewPage.php";
(I need to go this route because the frames[]... method doesn't work
well if the IFrame is dynamically generated).

So the IFrame's page is changed successfully to NewPage.php (or any
other page I specify). Now I need NewPage.php to redirect to another
page on the server side (ie. via the 'Location' header). This also
works fine in that the redirected page is displayed.

The last part is to get the URL of this final page.
I tried w/:
document.getElementByID('frameName').src
but it's giving me the page I first specified ('NewPage.php' in this
case), not the redirected page (which is shown).
I'm guessing this is something related to the DOM property not
reflecting the actual content.

Any ideas?
 
S

saber850

So the IFrame's page is changed successfully to NewPage.php (or any
other page I specify).

I forgot to mention one important detail: the problem exists when the
IFrame's page comes from a different domain. If the pages are served
by the same server, there are a few ways to get the IFrame's URL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top