Checkboxes and forms

Results 1 to 5 of 5

Thread: Checkboxes and forms

  1. #1
    Siboo Guest

    Default Checkboxes and forms

    How can I tell if a checkbox is checked in ASP? I want to submit my form and if the checkbox is selected display a message on the screen. so i try this in my second asp page...<BR>if request("checkboxName") = "checked" then <BR>display the line<BR>end if<BR>It doesn&#039t work. Any suggestions?<BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Checkboxes and forms

    for each chk in request.form("checkboxname")<BR> if chk="red"(red being the value of the checked) then<BR> ............<BR> end if<BR>next<BR><BR>basically you can loop through a whole group of checkboxes, to know which are checked.

  3. #3
    Join Date
    Dec 1969

    Default RE: Checkboxes and forms

    this might not be it but...<BR>try request.form("name")

  4. #4
    suresh Guest

    Default RE: Checkboxes and forms

    You need to use Request.form("checkboxname")<BR><BR>&#060;%<BR><BR >if request.form("chkboxname")="condition1" then<BR> response.write ("blablabla")<BR>end if<BR><BR>%&#062;<BR>

  5. #5
    ayan pal Guest

    Default RE: Checkboxes and forms

    use this:<BR><BR>&#060;% if request.form("checkboxname")="on" then<BR> request.write "it was checked"<BR> else<BR> request.write "it was not checked"<BR> end if<BR>%&#062;<BR><BR>"on" is built into asp as a checkbox checker<BR>

Posting Permissions

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