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
krishna casukhela 7krishna casukhela 7 

control not staying in opened TAB

Hello
I have an visual force page purely designed using HTML5 responsive.
It has three tabs , profile TAB, Preferences TAB and Subscriptions TAB.

so in UI i have three custom objects i.e profile , preferences and subscriptions.

each TAB has some set of fields to enter along with apex command button to saves changes to respective sobject.

When I am working in Profile TAB, when I click SAVE button,control remains in the Profile TAB for me to review my changes.
When I am working in Preferences TAB, when I click SAVE button,control does not remain in the Preferences TAB for me to review my changes and it goes back to the Profile TAB.
similarly it happens for subscription tab, control goes back to Profile TAB when I click SAVE button in subscription TAB.
Please let me know if there is a way to prevent this.

A piece of HTML code along with apex controls is shown.
<apex:page controller="PrefCenterCTRL" docType="html-5.0">
<head>
    <meta charset="utf-8" />
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <title>Preferences</title>

    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<apex:stylesheet value="{!URLFOR($Resource.bootstap)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.materialkit)}"/>

</head>

<body>

    <div class="wrapper">   

            <div class="form-container">
                <div class="card">
<apex:image id="SonyLogo" value="{!$Resource.MyImage}" alt="" styleClass="img-circle"/>
                        <p>Hi, {!fanFirstName}</p>
                        <p>Edit your details &amp; hit "Save Changes" to update </p>
                        <apex:pageMessages ></apex:pageMessages>

 <apex:form >
                    <!--<form class="form" method="" action="">-->
                        <div class="content" style="clear:both">
                            <div class="preferences">
                                <ul  class="nav nav-pills">
                                    <li class="active"><a  href="#1a" data-toggle="tab">Profile</a></li>
                                    <li><a href="#2a" data-toggle="tab">Preferences</a></li>
                                    <li><a href="#3a" data-toggle="tab">subscriptions</a></li>
                                </ul>
                                <div class="tab-content clearfix">
                                    <div class="tab-pane active" id="1a">
                                        <div class="white-block"> 
                                            <h4>HOW SHOULD WE CONTACT YOU?</h4>
                                            <div class="form-group label-floating">
                                                <label class="control-label">EMAIL *</label>
                                                <apex:inputText value="{!fanEmail}" styleClass="form-control"/>
                                                <!-- <input type="email" class="form-control"/> -->
                                            </div>
</div>

</apex:form>
</apex:page>
I hope I am clear.

Thanks
krishna