Dear All
I am new Java Script , I would like to Limit the maximum value of Number filed which is Read only based on another filed , I got one Java Script from Laserfiche answers which is working , but when I Make the filed read-only the java script is not working is it anyway I can accomplish that below is my code
$(document).ready(function(){ // whenever max value changes $('.maxattendees input').on('change',function(){ // get max from field var max = $(this).val(); // get number1 field var number1 = $('.attendees input'); // check if max populated if (max != '') { // set number1 max value number1.attr('max',max); } else { // remove restriction if max blank number1.removeAttr('max'); } // if not blank, revalidate if(number1.val() != '') number1.parsley().validate(); }); });