Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Target to Response.Redirect

Status
Not open for further replies.

Lonx

Programmer
Sep 30, 2004
11
ZA

How do I add (Target = "_Self") To the line below

Response.Redirect(session("URL"))

Thank you
 
you can't - that is a client-side command and response.redirect is done on the server.

You could add a querystring to the url that tells the browser to load the page into a particular place:
Code:
Response.Redirect("page1.asp?load=top")

[b]page1.asp[/b]
<html>
<head>
<%
If Request.QueryString("load") = "top" Then
  Response.Write "<script type=""text/javascript"">if(window != top) window.top.location=this.location.href;</script>" & vbcrlf
End If
%>
</head>



Tony
[red]_________________________________________________________________[/red]
Webmaster -
 
My Problem is this....

My site is done in frames, but there are pages that are restricted, so if you are not logged in you get sent to the login page, If login is successful you get redirected to the page you where on your way to. The problem is that the redirected page must open within the frames or it losses the menu. I keep the Path in (session ("url")) cos depending on where you were going is where you get directed.

So will the above code help me out with that or must I re-structure the whole site?

Thanks Guys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top