+ Start a Discussion
Jyosi jyosiJyosi jyosi 

To hide the button once it clicked

Hello All,

I want to hide the button once it's clicked and display the another section.

<apex:pageBlockSection title="Contact Information" collapsible="true" columns="2">   
                <apex:inputCheckbox value="{!DupeCheck}" label="SkipDupeCheck"><apex:actionSupport event="onchange" reRender="DupeCheckOutputPanel" id="Us"  />
                </apex:inputCheckbox>
<apex:inputField value="{!con.LastName}" />
                <apex:inputField value="{!con.Birthdate}" />
                <apex:inputField value="{!con.Gender__c}"/>

      <apex:commandButton value="Verify Duplication" action="{!verify}" rerender="detailError,DupValue" onclick="this.disabled"  /> want to hide the button  once it clicked once and display the below section

<apex:pageBlock rendered="{!con.Email!=null}">
              <apex:pageBlockSection title="Sample Address Information" collapsible="true" columns="2">
                 <apex:inputField value="{!con.Sample_Shipping_Street__c}" id="shpstreet1" required="true"/>
                <apex:inputField value="{!con.Alternate_Street__c}" id="altstreet1"/>
 
Mahesh DMahesh D
Please check the below sample code:
 
<apex:pageBlockSection title="Contact Information" collapsible="true" columns="2">   
<apex:inputCheckbox value="{!DupeCheck}" label="SkipDupeCheck"><apex:actionSupport event="onchange" reRender="DupeCheckOutputPanel" id="Us"  />
</apex:inputCheckbox>
<apex:inputField value="{!con.LastName}" />
<apex:inputField value="{!con.Birthdate}" />
<apex:inputField value="{!con.Gender__c}"/>
<apex:outputPanel id="opPanel">
<apex:commandButton value="Verify Duplication" action="{!verify}" rerender="opPanel, detailError,DupValue" rendered="{!isDisplay}"  /> want to hide the button  once it clicked once and display the below section

<apex:pageBlock rendered="{!con.Email!=null}">
<apex:pageBlockSection title="Sample Address Information" collapsible="true" columns="2">
 <apex:inputField value="{!con.Sample_Shipping_Street__c}" id="shpstreet1" required="true"/>
<apex:inputField value="{!con.Alternate_Street__c}" id="altstreet1"/>

</apex:outputPanel>

Check the bold text.

Regards,
Mahesh