CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Simple Pop Up Message

Print topic Send  topic

Author Message
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.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.