Check to see if Check Boxes are Checked

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Check to see if Check Boxes are Checked

    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




    Lyn Guest

  2. Similar Questions and Discussions

    1. Check boxes in Dreamweaver/PHP
      I have a MySql database, using PHP and able to display the database in a form. What I need to do is for the user to be able to click on the check...
    2. Check Boxes
      Fmpro 5.5 Windows XP pro I have a number field set up as a checkboxes, numbered from 11 to 18. I had a script that used to check all the boxes...
    3. P. S. re check boxes
      I can only export this in a filtered web page. That's the only option I am given. If these alignment problems are due to that aspect, how do I...
    4. Check In all Checked Out files (k)
      Just started using the check in/out feature. I had a change to a template which changed all the files in the site. I then synched it up with the...
    5. check boxes,opps
      I want a form that has 3 check boxes more than one can be choosen field X in my table will have the data like a form asks your name, age...
  3. #2

    Default Re: Check to see if Check Boxes are Checked

    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


    "Lyn" <ftbcoaches@aol.com> wrote in message
    news:09d201c3c331$c1911330$a501280a@phx.gbl...
    > 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
    >
    >
    >
    >

    Ray at Guest

  4. #3

    Default Re: Check to see if Check Boxes are Checked

    "Lyn" <ftbcoaches@aol.com> wrote in message
    news:09d201c3c331$c1911330$a501280a@phx.gbl...
    > 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

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

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


    McKirahan Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139