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
Post a Comment