You need to sign in to do that
Don't have an account?

Hide a button on click
I want to hide my save button (id="c2") when some one click one the edit button. i tried using j query, but it does not work. Does anybody have any idea? Thanks
Extension
<apex:pageblockButtons > <apex:commandButton action="{!doToggleEditMode}" value="Edit" reRender="myPanel" rendered="{!NOT(bEditMode)}" id="c1" /> <apex:commandButton action="{!doSave}" value="Save" reRender="myPanel" rendered="{!bEditMode}" /> <apex:commandButton value="PRINT" onclick="window.print();"/> <apex:commandButton value="Cancel" action="{!Cancel}"/> <apex:commandButton value="Save" action="{!save}" id="c2"/> </apex:pageblockButtons>
Extension
public Boolean bEditMode { get { if(bEditMode == null) { bEditmode = false; } return bEditMode; } set; } public PageReference doToggleEditMode() { bEditMode = !bEditMode; return null; } public PageReference doSave() { try { controller.save(); doToggleEditMode(); } catch(Exception ex) { } return null; }
Thanks
AR
If you found this reply useful then please mark it as best answer.
All Answers
Why are you having two Save buttons?
Thanks
AR
does the button "c2" inside "myPanel"? because is the only thing that can change with the action of the buttons.
I hope it help! :)
Thanks
AR
If you found this reply useful then please mark it as best answer.