Results 1 to 5 of 5

Thread: Unique Problem

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Question Unique Problem

    Please help. How can I evaluate in the asp code when a checkbox has been checked or not checked? I know how to set it as checked.

    See when a user does a form submit when I gather their data I need to only evaluate what items were checked, not all of the items every time.

    Thanks

  2. #2
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Can't be that unique a problem if you cross posted it.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  3. #3
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Uhm... and you are asking for help?
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  4. #4
    scoutt
    Guest
    yeah idiot.. j/k

    a checkbox is going to return 1 or 0 doesn't matter how it is coded.

  5. #5
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    276
    Try this one:
    Code:
    test.htm
    -----------
    <form name=frm action=test.asp method=post>
    <input type="checkbox" value="Value1" name="product1">First
    <br><input type="checkbox" value="Value2" name="product1">Second
    <br><input type="checkbox" value="Value3" name="product1">Third
    <br><input type="checkbox" value="Value4" name="product1">Fourth
    <input type=submit value=submit>
    </form>
    test.asp
    ----------
    response.write request.form("product1")
    This returns a comma separated string containing the values of the selected products. Mind that i have used the same name "product1" (thats up to u) ..since this would fetch me the selected products at one go. I then manipulate the result using split/join method combination.

    - Jemima.

Posting Permissions

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



Click Here to Expand Forum to Full Width