Thanks again for your input guys. I've implemented the code and it works great!
I started thinking (uh oh), and I was wondering if it's possible to use the code you helped me with to design a second set of tabs inside the first set of tabs. So I started tinkering around and this is what I got...
First, I added two extra panels to the Javascript 'var-panels', like so:
- Code: Select all
<script type="text/javascript">
<!--
var panels = new Array('main-panel', 'nfl-panel', 'nhl-panel', 'mlb-panel', 'nba-panel', 'one-panel', 'two-panel');
//-->
</script>
Then I simply added the tab code inside the 'main page' html, like this:
- Code: Select all
<div id="tabs">
<ul>
<li class="activetab" id="one-panel-tab"><a name="one" href="#one" onclick="subPanels('one-panel'); return false;"><span>One</span></a></li>
<li class="" id="two-panel-tab"><a name="two" href="#two" onclick="subPanels('two-panel'); return false;"><span>Two</span></a></li>
</ul>
</div>
So the above are my edits, here's the full file if someone feels like testing it.
- Code: Select all
<!-- INCLUDE overall_header.html -->
<script type="text/javascript">
<!--
var panels = new Array('main-panel', 'nfl-panel', 'nhl-panel', 'mlb-panel', 'nba-panel', 'one-panel', 'two-panel');
//-->
</script>
<h2>{PAGE_TITLE}</h2>
<div id="tabs">
<ul>
<li class="activetab" id="main-panel-tab"><a name="main" href="#main" onclick="subPanels('main-panel'); return false;"><span>Main</span></a></li>
<li class="" id="nfl-panel-tab"><a name="nfl" href="#nfl" onclick="subPanels('nfl-panel'); return false;"><span>NFL</span></a></li>
<li class="" id="nhl-panel-tab"><a name="nhl" href="#nhl" onclick="subPanels('nhl-panel'); return false;"><span>NHL</span></a></li>
<li class="" id="mlb-panel-tab"><a name="mlb" href="#mlb" onclick="subPanels('mlb-panel'); return false;"><span>MLB</span></a></li>
<li class="" id="nba-panel-tab"><a name="nba" href="#nba" onclick="subPanels('nba-panel'); return false;"><span>NBA</span></a></li>
</ul>
</div>
<form method="post" action="{S_PROFILE_ACTION}" id="viewprofile">
<div class="panel bg3" style="margin: auto;">
<div class="inner" style="text-align: left;"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl><dt></dt></dl>
</li>
</ul>
<div style="display: block;" class="panel" id="main-panel">
<div class="inner"><span class="corners-top"><span></span></span>
<div id="tabs">
<ul>
<li class="activetab" id="one-panel-tab"><a name="one" href="#one" onclick="subPanels('one-panel'); return false;"><span>One</span></a></li>
<li class="" id="two-panel-tab"><a name="two" href="#two" onclick="subPanels('two-panel'); return false;"><span>Two</span></a></li>
</ul>
</div>
<h3>{L_MAIN_TITLE}</h3>
<dl class="left-box detailsprof" style="width: 80%;">
<dt>Main Name1:</dt> <dd>Main Discription1</dd>
<dt>Main Name2:</dt> <dd>Main Discription2</dd>
<dt></dt> <dd><b>Everything from your trophycase_main.html template goes in here.</b></dd>
</dl>
<span class="corners-bottom"><span></span></span></div>
</div>
<div style="display: none;" class="panel" id="nfl-panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h3>{L_NFL_TITLE}</h3>
<dl class="left-box detailsprof" style="width: 80%;">
<dt>NFL Name1:</dt> <dd>NFL Discription1</dd>
<dt>NFL Name2:</dt> <dd>NFL Discription2</dd>
<dt></dt> <dd><b>Everything from your trophycase_nfl.html template goes in here.</b></dd>
</dl>
<span class="corners-bottom"><span></span></span></div>
</div>
<div style="display: none;" class="panel" id="nhl-panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h3>{L_NHL_TITLE}</h3>
<dl class="left-box detailsprof" style="width: 80%;">
<dt>NHL Name1:</dt> <dd>NHL Discription1</dd>
<dt>NHL Name2:</dt> <dd>NHL Discription2</dd>
<dt></dt> <dd><b>Everything from your trophycase_nhl.html template goes in here.</b></dd>
</dl>
<span class="corners-bottom"><span></span></span></div>
</div>
<div style="display: none;" class="panel" id="mlb-panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h3>{L_MLB_TITLE}</h3>
<dl class="left-box detailsprof" style="width: 80%;">
<dt>MLB Name1:</dt> <dd>MLB Discription1</dd>
<dt>MLB Name2:</dt> <dd>MLB Discription2</dd>
<dt></dt> <dd><b>Everything from your trophycase_mlb.html template goes in here.</b></dd>
</dl>
<span class="corners-bottom"><span></span></span></div>
</div>
<div style="display: none;" class="panel" id="nba-panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h3>{L_NBA_TITLE}</h3>
<dl class="left-box detailsprof" style="width: 80%;">
<dt>NBA Name1:</dt> <dd>NBA Discription1</dd>
<dt>NBA Name2:</dt> <dd>NBA Discription2</dd>
<dt></dt> <dd><b>Everything from your trophycase_nba.html template goes in here.</b></dd>
</dl>
<span class="corners-bottom"><span></span></span></div>
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>
</form>
<br />
<!-- INCLUDE overall_footer.html -->
In short, it did give me the appearance of two tabs inside the 'Main' tab. But it's non-functional. And clicking on a tab results in a page refresh with no default tab selected or displayed. I was hoping that adding tabs inside another set of tabs would be easy, but I'm thinking it's going to take a little more knowledge that what I currently have.
Tabs before clicking 'One' or 'Two'

Tabs after clicking 'One' or 'Two'

If I was to guess the problem, my guess would be that I may need a second javascript field to designate a second set of tabs. I will look into this. Never had to deal with Javascript before, so this is a great learning experience for sure. Any comments are appreciated. I'll be reading up on Javascript and looking into the Tabbed Profiles mod a little more.