We have requirement when customer click on save button, and then save & close and cancel buttons should get disable.
I have tried this but its not working. Please help me
VF Page :
jQuery Function :
function KillButtonsOtherThanQuickSave()
{
var $button1 = jQuery(document.getElementById('{!$Component.pg.addquoteform.pbl.pbb.btn1}'));
$button1.toggleClass('btnDisabled', true).attr('disabled', 'disabled');
var $button7 = jQuery(document.getElementById('{!$Component.pg.addquoteform.pbl.pbb.btn7}'));
$button7.toggleClass('btnDisabled', true).attr('disabled', 'disabled');
}
Buttons:
<apex:commandButton action="{!doSaveAndClose}" value="Save & Close" rendered="{!editMode && !aprove.isInApproval}" id="btn1" disabled="{!NOT(canSave)}"/>
<apex:commandButton action="{!cancel}" immediate="true" value="Cancel" id="btn7"/>