Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageYou 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
Post Follow-up to this messageSmart 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... > > >
Post Follow-up to this messageDavid, 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... > Smart idea. Thanks. > > I would put that into the page 'OnLoad' procedure, right? > > Could it trigger pop-up blockers, though? > > "Tim Williams" wrote: >
Post Follow-up to this messageThanks. 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... > > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.