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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

location.href

Status
Not open for further replies.

arpan

Programmer
Oct 16, 2002
336
IN
I have a web page which has 3 frames-top, middle & bottom. The top & the bottom frames always remain static; whatever interaction has to be done with the user is being done in the middle frame (which is an ASP page). The middle frame has a "Logout" link. When this link is clicked, the user is directed to Signout.asp (which is in the middle frame). At the same time, a querystring named ExitURL= also gets appended to Signout.asp. My intention is that when the user comes to Signout.asp (after clicking the "Logout" link), he will be redirected to the URL which is the value of the querystring named ExitURL. Also please note that when the user is redirected to the Exit URL, the Exit URL should not be in frames & that it should cover the entire browser. To ensure that the Exit URL opens up in the entire browser window, I am using location.href instead of using the more conventional Response.Redirect (ASP). This is what I have done:
Code:
<%
Dim strExitURL
strExitURL=Request.QueryString(&quot;ExitURL&quot;)

If(strExitURL<>&quot;&quot;) Then
%>
<script language=&quot;JavaScript&quot;>
top.location.href=&quot;<%= strExitURL %>&quot;
</script>
<%
End If
%>


Now what is happening is though the user is getting redirected to the Exit URL, he is first shown Signout.asp (in the middle frame) & then only he gets redirected to the Exit URL. But what I want is that the user should be directly taken to the Exit URL & not display Signout.asp in between. Why is Signout.asp displayed in between? How do I make users go to the Exit URL directly without displaying Signout.asp? Please note that Signout.asp does some other work in ASP before the user gets directed to the Exit URL.

Thanks,

Arpan
 
Not shure but by using href property you should use also reload() method after

<script language=&quot;JavaScript&quot;>
top.location.href=&quot;<%= strExitURL %>&quot;
top.location.reload()
</script>



________
George, M
 
Thanks mate for your suggestion but I am sorry to say that it doesn't solve my problem in anyway.

Thanks once again,

Regards,

Arpan
 
This is what i use in my redirect pages.
Maybe it works, also could be some trouble using frames.

<script language=&quot;JavaScript&quot;>
top.location='<%= strExitURL %>'
</script>

could try this also.

<script language=&quot;JavaScript&quot;>
top.window.location='<%= strExitURL %>'
</script>


________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top