Enabling button on any value change in JSF form -


i have multiple fields including text,checkbok box, drop-down etc in jsf form, showing values db.i submit button disabled default , clickable if user made changes of fields in form. please !!

not tested, use :

$(document).ready(function() {     $('#formid input[type="submit"]').attr('disabled','disabled');     $('#formid').change(function(){ $('#formid input[type="submit"]').removeattr('disabled'); }); }); 

if don't use jquery functions in view (any primefaces ajax buttons example), might need add :

<h:outputscript library="primefaces" name="jquery/jquery.js" /> 

Comments

Popular posts from this blog

c++ - Do gcc's __float128 floating point numbers take the current rounding mode into account? -

java - the value of local variable is not used -