IFrame URL after server-side redirect

Discussion in 'Javascript' started by saber850@yahoo.com, Oct 17, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Guest

    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, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    959
  2. =?Utf-8?B?TUxpYmJ5?=

    Redirect an IFrame's Parent Page: Server-Side Code

    =?Utf-8?B?TUxpYmJ5?=, Mar 16, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    12,687
    Sheryl Landon
    Apr 28, 2005
  3. JimLad
    Replies:
    3
    Views:
    2,066
    Alexey Smirnov
    Jan 28, 2010
  4. Sal
    Replies:
    1
    Views:
    1,042
  5. Daedalous
    Replies:
    3
    Views:
    832
    Daedalous
    Jan 16, 2004
Loading...

Share This Page