This topic is locked

How to Redirect?

4/12/2009 11:53:02 AM
ASPRunnerPro General questions
E
ErinSigma author

Good Easter to all.
I am using this code to raise an Alert and it works fine. What I'd like to do is to redirect the user to the previous page or another page based on this script (and I will be adding code to redirect based on the login id):
... OTHER CODE HERE
If NOT rsAccounts.EOF Then

rsAccounts.close
strMSG = "HOLD ON " & UCase(session("LoggedUser")) & "!\n\n"

strMSG = strMsg & "You have already made your selections!\n\n"

strMSG = strMsg & "Email the Administrator to have them deleted!"
Response.Write("<" & "script>alert('" & strMSG & "');" & "<" & "/script>")
End if

%>
... OTHER CODE HERE - actually just falls through to the ADD form.
What I need to do is to redirect the user (if he/she has made selections) to another page. I've tried response.redirect and location.href but it just falls thu and continues on with the ADD Page.
I know the above works as I've tried with accounts that have/haven't made selections.
Any help is appreciated.
Thanks

E
ErinSigma author 4/12/2009

[RESOLVED]
I figured this out.
Cheers...