Get Checkbox "Checked" value on form submit

Discussion in 'ASP General' started by John E, Jul 3, 2003.

  1. John E

    John E Guest

    How do I get whether a checkbox is ticked in a form on a form's submission
    (true or false)? How do I use the Request object in ASP?
    John E, Jul 3, 2003
    #1
    1. Advertising

  2. John E

    Ray at Guest

    Well, this should work

    <%
    If request.form("thecheckbox") <> "" Then Response.write "Yes, it was
    checked." %>

    That's assuming you gave your checkbox a value greater than "".

    Ray at work

    "John E" <> wrote in message
    news:be1hnt$7vct$...
    > How do I get whether a checkbox is ticked in a form on a form's submission
    > (true or false)? How do I use the Request object in ASP?
    >
    >
    Ray at, Jul 3, 2003
    #2
    1. Advertising

  3. "John E" <> writes:

    > How do I get whether a checkbox is ticked in a form on a form's submission
    > (true or false)?


    onsubmit="if(this.form.elements['checkboxName'].checked){alert('Check!');}"

    > How do I use the Request object in ASP?


    I have never used ASP, but the code I have been subjected to just
    said something like
    Request.blah
    That is how you access it in Javascript. What its properties are,
    I leave to the ASP-group to answer.

    /L
    --
    Lasse Reichstein Nielsen -
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Jul 3, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yurps
    Replies:
    1
    Views:
    6,863
    rajeshthangarasu1983
    Feb 29, 2008
  2. runescience
    Replies:
    0
    Views:
    4,232
    runescience
    Feb 23, 2006
  3. John E
    Replies:
    2
    Views:
    301
    Lasse Reichstein Nielsen
    Jul 3, 2003
  4. Replies:
    2
    Views:
    308
  5. randy
    Replies:
    13
    Views:
    433
    Tad McClellan
    Nov 1, 2003
Loading...

Share This Page