Response.Redirecting out of a frame

Results 1 to 3 of 3

Thread: Response.Redirecting out of a frame

  1. #1
    Join Date
    Dec 1969

    Default Response.Redirecting out of a frame

    Hi there,<BR><BR>Is it possible to tell a Response.Redirect command which frame<BR>to target, similar to the target attribute of the &#060;a href> tag?<BR><BR>I have a page with 3 frames. The header and footer are static HTML files and the middle frame is an ASP. When the ASP loads, if a certain criteria is met I want to redirect the response out of the frameset and onto a frameless page (and without opening up a new window).<BR><BR>Any suggestions?! Thanks!<BR><BR><BR>Oliver<BR>

  2. #2
    Todd Bailey Guest

    Default RE: Response.Redirecting out of a frame

    Hi!<BR><BR>Nope, there is no way to do a target with response.redirect. The way to fix that is to build an onload statement with asp and then response.end the asp. then have the onload event call that asp statement.<BR><BR>Example:<BR>sOnload="onload=""to p.window.document.location=&#039somepage.asp&#039" ""<BR><BR>(you could also specify certain frames instead of top)<BR><BR>and then in the body tag..<BR><BR>&#060;body &#060;% = sOnload &#037;&#062;><BR><BR>now, if there there is a string in the sOnload, it will show up in the body tag, and if not, nothing will happen. Using this method, you could build a Select Case with multiple onload events based on your code.<BR><BR>Todd<BR>

  3. #3
    Join Date
    Dec 1969

    Default Redirecting with JavaScript

    I&#039ve used JavaScript for frames...<BR><BR>&#039---- RELOCATION --------------------------<BR>&#060;SCRIPT LANGUAGE="JavaScript">parent.location = "">&#060;/SCRIPT>"<BR>&#039------------------------------------------<BR><BR>The tricky thing is the &#039parent&#039 part. You&#039ll have to check, but I think I&#039ve used this to target frames by using the frame name instead of &#039parent&#039.<BR><BR>Doug

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts