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

MsgBox Problems 1

Status
Not open for further replies.
Apr 25, 2002
156
0
0
GB
Hi all,

Hi this is the code i am using to test for a session variable .... my problem is simple i want to test the value of the session as below and if <> yes then to show a messagebox with a button to click to acknowledge reading the message.

<%
if session("Entry") = "Yes" then
MsgBox "You are already entered in table",,"Your Entered"
response.redirect ("Premiership home.asp")
End IF
%>

I have tried to do this with the following as well and it still doesn't show the msgbox

<script language="VBScript">
msgbox "hello world"
</script>

what am i doing wrong now.... ?

regards
murray
 
msgBox() works client-side, Response.Redirect server-side. Try something like:
Code:
<%	If session("Entry") = "Yes" Then %>
<script language="VBScript">
msgBox "You are already entered in table",,"Your Entered"
window.location.href = "Premiership home.asp"
</script>
<%		Response.End
	End If
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top