Link to home
Start Free TrialLog in
Avatar of kiwistag
kiwistagFlag for New Zealand

asked on

Disabling the Forms Submit button until a checkbox is selected

Has anyone got a URL or a piece of JS code handy that can ensures a Form Submit button stays disabled until a checkbox is ticked?
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Proculopsis

Here's another example for you:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<script src="" language="javascript"></script>
<script language="JavaScript">

$(function() {

  $("#enable").click( validate );
  $("#process").attr( { disabled: true } );


function validate() {
  $("#process").attr( { disabled: !this.checked } );



<input id="enable" type="checkbox" />
<input id="process" type="button" value="Submit" /> 


Open in new window

Avatar of kiwistag


Was only missing <script> at the top but worked a dream - thanks :)