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

Discussion in 'ASP .Net' started by =?Utf-8?B?TUxpYmJ5?=, Mar 16, 2005.

  1. How can an IFrame's aspx page force a server-side redirect on its parent
    page? Typically, an IFrame's client-side javascript specifies '_top' to
    change the parent page...

    window.open('default.aspx?SMID=18', '_top', '', false);

    However, the server-side Redirect doesn't include '_top'.

    I tried to write the following from server-side code hoping it would execute
    immediatly at the client but it won't fire, I'm not sure why:

    Response.Write("<script
    language=javascript>window.open('default.aspx?SMID=18', '_top', '',
    false);</script>");

    Please let me know if you have any ideas and thanks in advance for any help,

    Mike
    --
    mcp, mcse, mcsd, mcad.net, mcsd.net
    =?Utf-8?B?TUxpYmJ5?=, Mar 16, 2005
    #1
    1. Advertising

  2. I isolated the problem and believe it is a bug. The method, window.open()
    stops working if the IFrame's zone has not been given adequate time to be
    resolved, i.e. "Unknown Zone". If the zone has been resolved then then
    window.open() works and the top window can be replaced.

    Interesting enough, if you click a link (non javascript) before the IFrame's
    zone is resolved the top page changes:

    <a href="foo.aspx" target=_top>foo</a>

    However, window.open will stop working if you click it before the IFrame's
    zone has been resolved:

    <a href='javascript:window.open("foo.aspx", "_top", "", false)'>foo</a>

    I still need to automate server-side code that changes the _top url from
    within an IFrame's aspx page. Please let me know if you have any ideas,

    Mike
    =?Utf-8?B?TUxpYmJ5?=, Mar 20, 2005
    #2
    1. Advertising

  3. Hi Mike (or anyone else listening ;-):

    Did you happen to find a solution for this? I'm battling the same problem.
    Thanks,
    Sheryl

    "MLibby" <> wrote in message
    news:...
    >I isolated the problem and believe it is a bug. The method, window.open()
    > stops working if the IFrame's zone has not been given adequate time to be
    > resolved, i.e. "Unknown Zone". If the zone has been resolved then then
    > window.open() works and the top window can be replaced.
    >
    > Interesting enough, if you click a link (non javascript) before the
    > IFrame's
    > zone is resolved the top page changes:
    >
    > <a href="foo.aspx" target=_top>foo</a>
    >
    > However, window.open will stop working if you click it before the IFrame's
    > zone has been resolved:
    >
    > <a href='javascript:window.open("foo.aspx", "_top", "", false)'>foo</a>
    >
    > I still need to automate server-side code that changes the _top url from
    > within an IFrame's aspx page. Please let me know if you have any ideas,
    >
    > Mike
    Sheryl Landon, Apr 28, 2005
    #3
    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. Sheryl Landon
    Replies:
    4
    Views:
    63,587
    sateswar
    Feb 27, 2012
  2. Replies:
    0
    Views:
    674
  3. Replies:
    0
    Views:
    131
  4. PD
    Replies:
    6
    Views:
    702
  5. Replies:
    1
    Views:
    185
Loading...

Share This Page