Doug
|
Posted: 01/03/2002, 6:20 PM |
|
I have code on the open event of the page that redirects the user if a Variable is null. I just want to "warn" them first
This is what I got:
---------------
If Session("MyAccountID") = "" Then
***can I put something here***
Response.Redirect "MyAccounts.asp"
end IF
|
|
|
parsam
|
Posted: 01/03/2002, 11:40 PM |
|
call a vb or java script function to display the confirmation message and then redirect accordingly.
If Session("MyAccountID") = "" Then
call function_name
end IF
|
|
|
Nicole
|
Posted: 01/04/2002, 2:54 AM |
|
Doug,
you cannot use an print code before redirection otherwise you'll get the error and user won't be redirected. So my advise is to use JavaScript for this purpose:
response.write "<script language = 'javascript'> alert('message text'); window.location = ""MyAccount.asp""</script>"
I.e. the whole code:
If Session("MyAccountID") = "" Then
response.write "<script language = 'javascript'> alert('message text'); window.location = ""MyAccount.asp""</script>"
end if
|
|
|
Doug
|
Posted: 01/04/2002, 9:10 AM |
|
Thanks, it will do. My lack of scripting ability holds me back but you just taught me a usefull thing. Thanks.
|
|
|