Redirect out of a Frameset
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > Redirect out of a Frameset




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Redirect out of a Frameset  
David GB


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-24-04 01:54 AM

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 a follow-up to this message ]



    Re: Redirect out of a Frameset  
Tim Williams


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-24-04 08: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







[ Post a follow-up to this message ]



    Re: Redirect out of a Frameset  
David GB


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-27-04 07: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... 
>
>
>





[ Post a follow-up to this message ]



    Re: Redirect out of a Frameset  
Tim Williams


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-27-04 07: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:
> 







[ Post a follow-up to this message ]



    Re: Redirect out of a Frameset  
David GB


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-27-04 10: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... 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:20 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register