IIS ASP - Redirect out of a Frameset

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > December 2004 > Redirect out of a Frameset





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Redirect out of a Frameset
David GB

2004-12-23, 8:54 pm

If a page runnning in a frame does a redirect, the new page is loaded into
the same frame.

How do I do a redirect that 'looses' the frameset?

In html, you can create a link with "target=_top" and it replaces the entire
frameset.

But a reponse.redirect("NewPage.aspx Target=_top") becomes:
http://server/NewPage.aspx%20Target=_top

How do I do this? Can I stop it from parsing the space into %20, or is
there a different method altogether I should use?

David
--
David Gordon-Brown
Tim Williams

2004-12-24, 3:02 am

You could send back a HTML page with some javascript to load your
required URL into the top level window.
Should not mess with the history list.

<script type="text/javascript">
top.location.replace( "yourURLHere" );
</script>


Tim.


"David GB" <DavidGB@discussions.microsoft.com> wrote in message
news:326D92A9-3038-41D9-915E-828B7C477A6C@microsoft.com...
> If a page runnning in a frame does a redirect, the new page is
> loaded into
> the same frame.
>
> How do I do a redirect that 'looses' the frameset?
>
> In html, you can create a link with "target=_top" and it replaces
> the entire
> frameset.
>
> But a reponse.redirect("NewPage.aspx Target=_top") becomes:
> http://server/NewPage.aspx%20Target=_top
>
> How do I do this? Can I stop it from parsing the space into %20, or
> is
> there a different method altogether I should use?
>
> David
> --
> David Gordon-Brown



David GB

2004-12-27, 2:47 am

Smart idea. Thanks.

I would put that into the page 'OnLoad' procedure, right?

Could it trigger pop-up blockers, though?

"Tim Williams" wrote:

> You could send back a HTML page with some javascript to load your
> required URL into the top level window.
> Should not mess with the history list.
>
> <script type="text/javascript">
> top.location.replace( "yourURLHere" );
> </script>
>
>
> Tim.
>
>
> "David GB" <DavidGB@discussions.microsoft.com> wrote in message
> news:326D92A9-3038-41D9-915E-828B7C477A6C@microsoft.com...
>
>
>

Tim Williams

2004-12-27, 2:47 am

David,

If you just put it in the page it will execute without having to be
called from onload. AFAIK it will not trigger pop-up blockers since
you are not opening a new window. It will, however, fail if the user
has js disabled or is not using a js-capable browser, so beware of
that.

Tim.


"David GB" <DavidGB@discussions.microsoft.com> wrote in message
news:8C609857-494C-4370-B44B-0D9918D6A981@microsoft.com...[vbcol=seagreen]
> Smart idea. Thanks.
>
> I would put that into the page 'OnLoad' procedure, right?
>
> Could it trigger pop-up blockers, though?
>
> "Tim Williams" wrote:
>


David GB

2004-12-27, 5:49 pm

Thanks. Very helpful.

David

"Tim Williams" wrote:

> David,
>
> If you just put it in the page it will execute without having to be
> called from onload. AFAIK it will not trigger pop-up blockers since
> you are not opening a new window. It will, however, fail if the user
> has js disabled or is not using a js-capable browser, so beware of
> that.
>
> Tim.
>
>
> "David GB" <DavidGB@discussions.microsoft.com> wrote in message
> news:8C609857-494C-4370-B44B-0D9918D6A981@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com