Steve Bohler
asked on
Response.redirect and specify target
Hello,
In Classic ASP, I have a redirect such as:
Response.Redirect LOGINPAGE & "?from=" &Server.URLEncode(strURL)
Our site has frames and the code as written will perform this redirect within the frame it's called, but I want it to redirect to the TOP target (the whole page).
Is this possible?
In Classic ASP, I have a redirect such as:
Response.Redirect LOGINPAGE & "?from=" &Server.URLEncode(strURL)
Our site has frames and the code as written will perform this redirect within the frame it's called, but I want it to redirect to the TOP target (the whole page).
Is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can try 'target=_parent', which opens the page in the parent frame.
ASKER
Could I use Javascript instead, like:
<script type="text/javascript">
window.location='<%=LOGINP AGE & "?from=" &Server.URLEncode(strURL) %>'
</script>
<script type="text/javascript">
window.location='<%=LOGINP
</script>
Could I use Javascript instead, like:
<script type="text/javascript">
window.location='<%=LOGINPAGE & "?from=" &Server.URLEncode(strURL) %>'
</script>
only if the page that's calling the script is the frame you want to go to login.asp. also keep in mind that you'll want to add some conditional if statement, otherwise it'll always go to login.asp in that current form
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, it's in a conditional statement. Is there any problem with that Javascript syntax, other than missing top.location?
the syntax is correct, except for what you mentioned, yes