Button disabled unless checkbox is checked

by Leonardo Trimarchi

HTML

<div>
           
          
           <Panel ID="pnltraffic" runat="server" cssclass="popup">
						If you choose to pay your bail without requesting traffic school, proof of correction or a trial,
your case will be closed and a conviction sent to the DMV. The option of traffic school or any trial will no longer be available. 
  					       
        				        <br /><br />
	
						<input type="checkbox" onchange="document.getElementById('terms').disabled = !this.checked;" id="chkAgree3" name="check" CausesValidation="true" CssClass="chkAgree"> I have read the above conditions and agree.<br><br />
						<span runat="server" ID="chkAgreeReq3" EnableClientScript="true" CssClass="chkValidator" ClientValidationFunction="chkAgree_Validate" ValidationGroup="chkAgree">You must agree to the terms to continue.</span>
     				                <br /><br />
						 <div style="text-align: center;"> 
             <button ID="btnarcCancel" runat="server" Text="Cancel" CausesValidation="false" onclick="Page_ClientValidateReset();" cssclass="nCourt-Button">Cancel </button>
						       <button onclick="location.href='https://www.ncourt.com/x-Press/x-onlinepayments.aspx?juris=6b2b6c76-b44a-4f23-b3b3-ec4d0beab7b5'" disabled id="terms" name="terms" class="button">Continue</button>
                   
              
				                </div>
                        
                        </Panel>
                        </div>