Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    224
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Disable submit button until checkbox is checked

    How would I, as the title says, disable a submit button until a checkbox is checked?

  • #2
    New Coder TripperTreats's Avatar
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <input type="submit" disabled=true>
    ....

    In the Checkbox tag:


    onclick = "document.getElementById('submitButtonId').disabled=false;"
    Psychedelic digital art at www.trippertreats.com.

    "And in the end, the love you take
    is equal to the love you make
    ."

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    This is not too effective. Another click will uncheck the box but still leave the submit button enabled. Also, disabling buttons has problem for people who for whatever reason have JavaScipt disabled.

    Have a look at Bill Poster's remarks at :-

    http://www.codingforums.com/showthread.php?t=95395


  •  

    Posting Permissions

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