function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Apex tabpanel not working - tab switch is not happening

I have pretty simple code which was working on an older sandbox, when i migrate to a new one, nothing happens when i click on other tabs.

<apex:page standardcontroller="Opportunity" extensions="ExtendedSalesProcess">

      .activeTab {background-color: #236FBD; color:white; 
      .inactiveTab { background-color: lightgrey; color:black; 
   <apex:tabPanel switchType="set" selectedTab="tabdetails" 
                  id="AccountTabPanel" tabClass="activeTab" 
      <apex:tab label="Solution Mapping" name="AccDetails1" id="tabdetails1">
      <apex:include pageName="OpportunityDealSummary"/>
      <apex:tab label="Tech Plan" name="AccDetails2" id="tabdetails2">
      <apex:include pageName="OpportunitySE"/>
       <apex:tab label="Lead" name="LeadDetails3" id="tabdetails3">
       <apex:include pageName="OpportunityLead" rendered="true"/> 
      <apex:tab label="Competitor Intelligence" name="AccDetails4" id="tabdetails4">
      <apex:include pageName="OpportunityCompetitor"/>

      <apex:tab label="Notes and Attachments" 
                name="NotesAndAttachments" id="tabNoteAtt">
         <apex:relatedList subject="{!opportunity}" 
                           list="CombinedAttachments" />
ShashankShashank (Salesforce Developers) 
This could be due to some other javascript code interfering with the tabpanel functionality. Please check if there are any home page components in the sidebar which are causing this.
Jayant Kumar JaiswalJayant Kumar Jaiswal

Please change selectedTab attribute of apex:tabPanel.
selectedTab should contain the "id" of any tab which you want to be default selected.
Try This:
 <apex:tabPanel switchType="set" selectedTab="tabdetails1" 
                  id="AccountTabPanel" tabClass="activeTab" 
Jayant Kumar JaiswalJayant Kumar Jaiswal
Also keep switchType="client"