By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

IFrame URL after server-side redirect

P: n/a
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?

Oct 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
sa******@yahoo.com wrote:
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.

Oct 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.