Check to see if Check Boxes are Checked

Check to see if Check Boxes are Checked

Post by Lyn » Wed, 17 Dec 2003 02:34:56


How do I check to see if a checked box is check on the
following page?

This is what I have. What am I doing wrong?

<%If Request("chkDirection") = 1 Then

Response.Write "True" & Request("PssWrd")
Else
Response.Write "False" & Request("chkDirection") &
Request("PssWrd")
End If%>

chkDirection is a check box from a previous page.

Thank You in Advance

Lyn
 
 
 

Check to see if Check Boxes are Checked

Post by Ray at <%s » Wed, 17 Dec 2003 02:50:36

What's the value of the checkbox on the form?

<input type="checkbox" name="chkDirection" value="theValue">

<%
If Request.Form("chkDirection") <> "" Then
Response.Write "True"
End If
%>


<%
If Request.Form("chkDirection") = "theValue" Then
Response.Write "True"
End If
%>

Either of those will work.

Ray at work

 
 
 

Check to see if Check Boxes are Checked

Post by McKiraha » Wed, 17 Dec 2003 03:00:38


Please don't post in mutiple newsgroups as you did.

You're answer is already in "microsoft.public.scripting.vbscript".