Get Checkbox "Checked" value on form submit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John E

    Get Checkbox "Checked" value on form submit

    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?


  • Lasse Reichstein Nielsen

    #2
    Re: Get Checkbox "Checked&q uot; value on form submit

    "John E" <La-la-land@hotmail.co m> writes:
    [color=blue]
    > How do I get whether a checkbox is ticked in a form on a form's submission
    > (true or false)?[/color]

    onsubmit="if(th is.form.element s['checkboxName'].checked){alert ('Check!');}"
    [color=blue]
    > How do I use the Request object in ASP?[/color]

    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 - lrn@hotpop.com
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    • Ray at

      #3
      Re: Get Checkbox &quot;Checked&q uot; value on form submit

      Well, this should work

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

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

      Ray at work

      "John E" <La-la-land@hotmail.co m> wrote in message
      news:be1hnt$7vc t$1@ID-83837.news.dfnc is.de...[color=blue]
      > 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?
      >
      >[/color]


      Comment

      Working...