I have a tabstrip on my page with a handful of tabs...
Then I have some JS that runs on pageload that will remove one of the tabs if its not needed...
This worked great, until I added the new Custom tab. Now when I click on Custom tab, it shows the content of the How To tab instead. You can see from the attached that the how to tab is set to display block and the clientstate selected index is set to 3 instead of 4. the custom tab is show correctly as selected, but the content revealed is incorrect. Am I missing something?
<
rad:RadTabStrip
ID
=
"radDetailsTabs"
CssClass
=
"radDetailsTabs"
runat
=
"server"
MultiPageID
=
"radmultipage"
BorderWidth
=
"0"
OnClientTabSelected
=
""
Skin
=
"Vista"
Style
=
"padding: 0; margin: 0;"
>
<
Tabs
>
<
rad:RadTab
Text
=
"Details"
Selected
=
"true"
Width
=
"95px"
>
</
rad:RadTab
>
<
rad:RadTab
Text
=
"Specifications"
Width
=
"95px"
>
</
rad:RadTab
>
<
rad:RadTab
Text
=
"Reviews"
Width
=
"95px"
>
</
rad:RadTab
>
<
rad:RadTab
Text
=
"How To"
Width
=
"95px"
>
</
rad:RadTab
>
<
rad:RadTab
Text
=
"Custom"
Width
=
"95px"
>
</
rad:RadTab
>
</
Tabs
>
</
rad:RadTabStrip
>
Then I have some JS that runs on pageload that will remove one of the tabs if its not needed...
function pageLoad() {
if (document.getElementById(
'ctl00_ContentPlaceHolder1_hidShowHowToTab'
).value ==
"0"
) {
hideTab(
"How To"
);
}
}
function hideTab(strTabName) {
var tabStrip = $find(
'ctl00_ContentPlaceHolder1_radDetailsTabs'
);
var tab = tabStrip.findTabByText(strTabName);
if (tab) {
var parentTab = tab.get_parent();
tabStrip.trackChanges();
parentTab.get_tabs().remove(tab);
tabStrip.commitChanges();
}
}
This worked great, until I added the new Custom tab. Now when I click on Custom tab, it shows the content of the How To tab instead. You can see from the attached that the how to tab is set to display block and the clientstate selected index is set to 3 instead of 4. the custom tab is show correctly as selected, but the content revealed is incorrect. Am I missing something?