marcdet
07-27-2008, 01:28 AM
1) Script Title: Ajax Tabs Content Script (v 2.2)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm
3) Describe Question:
Does anyone have an idea how to use an external link into the tabbed content using ID's instead of index #'s?
Using the standard code as below, I would like to link into the tabbed content with the following (or something similar?);
<a href="target.htm?flowertabs=myfavorite">Target Page</a>
which would lead me to target.htm with external2.htm tab selected and showing in the DIV.
<ul id="countrytabs" class="shadetabs">
<li><a href="external1.htm" rel="countrycontainer" class="selected" id="thebestest">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer" id="myfavorite">Tab 2</a></li>
<li><a href="external3.htm" rel="countrycontainer" id="justok">Tab 3</a></li>
<li><a href="external4.htm" rel="countrycontainer" id="notsogood">Tab 4</a></li>
</ul>
<div id="countrydivcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
</div>
<script type="text/javascript">
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>
As I would like to use the script, the number of tabs are dynamic based on the content available. While I know I always want to link to "myfavorite" from pages outside the tabbed area, I will never know ahead of time what position it is in. Any help is appreciated.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm
3) Describe Question:
Does anyone have an idea how to use an external link into the tabbed content using ID's instead of index #'s?
Using the standard code as below, I would like to link into the tabbed content with the following (or something similar?);
<a href="target.htm?flowertabs=myfavorite">Target Page</a>
which would lead me to target.htm with external2.htm tab selected and showing in the DIV.
<ul id="countrytabs" class="shadetabs">
<li><a href="external1.htm" rel="countrycontainer" class="selected" id="thebestest">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer" id="myfavorite">Tab 2</a></li>
<li><a href="external3.htm" rel="countrycontainer" id="justok">Tab 3</a></li>
<li><a href="external4.htm" rel="countrycontainer" id="notsogood">Tab 4</a></li>
</ul>
<div id="countrydivcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
</div>
<script type="text/javascript">
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>
As I would like to use the script, the number of tabs are dynamic based on the content available. While I know I always want to link to "myfavorite" from pages outside the tabbed area, I will never know ahead of time what position it is in. Any help is appreciated.