+ Start a Discussion
t.deepthi05t.deepthi05 

Tab Panel switch is not happening

Hi,

I am using apex tab panel but switching between tabs is not happening 

I even tried the below code in my page to test  even this is not working

<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
        <apex:tab label="One" name="name1" id="tabOnes">content for tab one</apex:tab>
        <apex:tab label="Two" name="name2" id="tabTwos">content for tab two</apex:tab>
    </apex:tabPanel>

Added the below javascript :

<script type="text/javascript" language="javascript">
    if(jQuery) {
        jQuery.noConflict();
    }
</script>
still the switching is not happening .

Can i know exactly where the problem is.



Vamsi KrishnaVamsi Krishna
deepthi,
seems you got the sample code from here..
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_tabPanel.htm

i just tried the same sample code in my dev org and it works perfectly fine.. you dont need the javascript/jquery script for this..

<apex:page id="thePage">
    <apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
        <apex:tab label="One" name="name1" id="tabOne">content for tab one</apex:tab>
        <apex:tab label="Two" name="name2" id="tabTwo">content for tab two</apex:tab>
    </apex:tabPanel>
</apex:page>
t.deepthi05t.deepthi05
I am using javascript due which it is switching is not happening

hence i used

<script type="text/javascript" language="javascript">
    if(jQuery) {
        jQuery.noConflict();
    }
</script>

but still it is not working
Nirmal ChristopherNirmal Christopher
You dont need any java script code to acheive this Deepti. Vamisi's code will work perfectly fine. If you want to maintain the state of each tab let me know i have done it before.