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

retain the command button colour change after performing form save and re-render
Hi,
Is there a way to retain the apex:command button colour even after the form is re-rendered
and some action like create/update is performed.
When i hit the save buton colour changes and reverts back to the original colour.any possible workaround will be helpful.
Is there a way to retain the apex:command button colour even after the form is re-rendered
<apex:page standardController="Account"> <apex:form id="f" > <apex:pageBlock title="My Content" mode="edit"> <apex:pageBlockSection title="My Content Section" columns="2"> <apex:inputField value="{!account.name}"/> <apex:inputField value="{!account.accountNumber}"/> </apex:pageBlockSection> <apex:pageBlockButtons > <apex:commandButton action="{!save}" onclick="this.style.background='blue';" reRender="f" value="Save"/> </apex:pageBlockButtons> </apex:pageBlock> <apex:outputText>test button colour</apex:outputText> </apex:form> </apex:page>
and some action like create/update is performed.
When i hit the save buton colour changes and reverts back to the original colour.any possible workaround will be helpful.
I have a detail page code .with account id.. ..this is just that i want to set the colour to be the same after any logic<like updating a field is performed.
the url will be something like this:
https://c.ap1.visual.force.com/apex/accountdetailpage?id=0019000001CWOzi for the detail page and certain logics are being performed on that
based on command button click