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
Arun TyagiArun Tyagi 

Big chalange for experience Develpor.....

<apex:page controller="temp"  sidebar="false">

<apex:form >
<apex:pageBlock >


           
<style>
.activeTab {background-color: #236FBD; color:white; background-image:none}
.inactiveTab { background-color: lightgray; color:black; background-image:none}
</style>

<apex:tabPanel id="tabPanel" switchType="client" immediate="true">
           <apex:tab label="Select Mail Merge Template">
           <apex:pageBlockSection >
           <apex:pageBlockTable value="{!temp1}" var="t">
           <apex:column >
           <apex:commandLink action="{!callEmailTemplate}" reRender="temp_dt" >
           {!t.name}
           <apex:param name="temp_id" assignTo="{!selectedTemplate}" value="{!t.id }"/>
              
           </apex:commandLink>
            
           </apex:column>
          
           </apex:pageBlockTable>
                  
                      
          <apex:outputPanel id="temp_dt" >
           {!em.Name}
          </apex:outputPanel>  
        
     </apex:pageBlockSection>
      </apex:tab>
               
<!----------------------------teb2-------------------------->
               
<apex:tab label="Edit Template">
<apex:outputPanel id="temp_dt" >
<apex:detail subject="{!$CurrentPage.parameters.temp_id}"/>
</apex:outputPanel>  
</apex:tab>
                
                
                <!-------tab3---------------->
                
                <apex:tab label="Select Contact" >
                
                <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<style>
* {
  margin: 0;
  padding: 0;
}
.tabs {
  list-style: none;
  width: 200px;
  float: left
}

.tabs a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  background: #fff;
  color: #000;   
  border-bottom: 1px solid #ccc;
}

.tabContent {
  margin-left: 200px;
  min-height: 300px;
  border: 1px solid #ccc;
  padding: 10px;
}

.tabs a.active {
  background: rgba(0,0,0,0.2);
}
.tabContent .tabBox {
  display: none
}
.tabContent .activeTab {
  display: block
}
</style>
<script>
$(document).ready(function(){
  $('.tabs a').click(function(){
    var tabId = $(this).attr('href');
    $('.tabs a').removeClass('active');
    $(this).addClass('active');
    $('.tabContent .tabBox').removeClass('activeTab');
    $(tabId).addClass('activeTab')
  });
});
</script>
<ul class="tabs" >
  <li><a class="active" href="#tab1">Tab One</a></li>
  <li><a href="#tab2">Tab Two</a></li>
  <li><a href="#tab3">Tab Three</a></li>
  <li><a href="#tab4">Tab Four</a></li>
</ul>  
<div class="tabContent">
  <div class="tabBox activeTab" id="tab1">Tab One</div>
  <div class="tabBox" id="tab2">Tab Two</div>
  <div class="tabBox" id="tab3">Tab Three</div>
  <div class="tabBox" id="tab4">Tab Four</div>
</div>
                
                <apex:selectRadio >
        <apex:selectOption itemLabel="Contacts View" itemValue="1"></apex:selectOption>
        <apex:selectOption itemLabel="Leads View" itemValue="2"></apex:selectOption>
          
      </apex:selectRadio>
              </apex:tab>
              
              
                <apex:tab label="Preview & Send" >
               </apex:tab>
</apex:tabPanel>
</apex:pageblock>

</apex:form>

</apex:page>
<-.............................................->this is the controller for this visualforce code

public class temp {
public string Contact{get;set;}
public string lead{get;set;}
public string selectedTemplate{get; set;}
public EmailTemplate em{get; set;}

public void callEmailTemplate(){
em = [select id,name,HtmlValue,body from EmailTemplate where Id=: selectedTemplate];

}
public temp() {
}

list<EmailTemplate> temp1=[SELECT id ,Name,HtmlValue FROM EmailTemplate  ORDER by Name ASC];
public list<EmailTemplate> gettemp1(){
return temp1;

 }
 }


<-............................->
problem is that . tab is not working ..when we click on other its not work .plz check it on your end
pconpcon
What do you mean "tab is not working"  What data is show?  What data is not shown?  Can you please include a screenshot of the incorrect behavior you are seeing?

NOTE: When adding code please use the "Add a code sample" button (icon <>) to increase readability and make it easier to reference.
Arun WebmindArun Webmind
there are four tab in snap shot. In this code tab is not working .
Arun WebmindArun Webmind
In this snap shot there are four tab on the top.Select mail merge template, Edit Template, Select Contact List, Preview $ Send . when we run this page, tab is showing only select mail merge view. but when we click on edit template or anthor tab ,its not work.

 
Arun WebmindArun Webmind
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
I think this jquery code is create the problem in select contact list tab.
Arun WebmindArun Webmind
Thanks for reply but now i have solved