How to disable the command buttons and Grey out the total vf page on any action?
Usually we multiple records creates whenever multiple click on save button on custom save button on VF page. So to overcome this issue we can hide the all buttons once user click on buttons. VF Page: <apex:commandButton action=”{!doSave}” id=”saveButton ” value=”save” onclick=”disableAllButtons()”/> <apex:commandButton action=”{!doCancel}” id=”cancelButton” value=”cancel” onclick=” disableAllButtons()”/> <Script> var j$ = jQuery.noConflict(); function disableAllButtons(){ j$(“[id$= saveButton],[id$= cancelButton]”).hide(); } function showButtons(){ j$(“[id$= cancelButton],[id$= saveButton]”).show(); } </Script> showButtons function is to show the button once the action. If we can use the same code for the input fields as well which have the action function. So that we can restrict the user to change the field and click the buttons immediately. Some times we have to restrict the user to modify the fields on that page after click on button or change on any fields ...