[Solved] Using jQuery to validate checkboxes and input text values
This might get you started. You can make the field validation as complex or simple as you wish. $(‘input[type=checkbox]’).click(function(){ var tmp = $(this).next(‘input’).val(); //validate tmp, for example: if (tmp.length > 1){ //alert(‘Text field has a value’); $(‘#mybutt’).prop(‘disabled’,false); }else{ //alert(‘Please provide a long value in text field’); $(‘#mybutt’).prop(‘disabled’, true); $(this).prop(‘checked’,false); } }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script> <input id=”mybutt” … Read more