1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2008
    Rep Power

    How to get 2 checkbox values


    Can you please help me this problem?

    I try to get two values from a checkbox. When 1 is checked, the other identical one should be checked as well.
    My Where clause is: DeptType LIKE '%" & strValue & "%'

    Here is the HTML form:
    <input type="checkbox" name="ckType" value=".A.">.A. (Note: there is one "dot" before and after A)
    <input type="hidden" name="ckType" value=".A">.A (Note: there is one "dot" before A)

    When the first checkbox is checked, then the hidden checkbox should be checked as well. So, the LIKE on the WHERE clause works with two values.

    Can you anyone help me how to solve this problem?

    Thanks very much!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Rep Power
    If I am reading this right then you will want some Javascript/JQuery to populate the value of the hidden input field, that is only actioned when the checkbox is checked (or unchecked to remove the value from the hidden field).
    Then a simple strValue = Request.Form("ckType") should pick up both these values and combine then into 1 string based on the position they are within the form page.
    Based on your checkbox then hidden field arrangement this would give the result of .A..A

IMN logo majestic logo threadwatch logo seochat tools logo