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

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -