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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -