View Full Version : Nested tab that loads in its same div

04-03-2009, 08:50 AM
1) Script Title: Ajax Tabs Content Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem:

At this moment my website has a tab menu, each tab loads an external html file that contains a normal list.

this is the tab menu:

<ul id="pruebas_tab" class="shadetabs">
<li><a href="rallyes.html" rel="contenedor" class="selected">Rallyes</a></li>
<li><a href="rallysprint.html" rel="contenedor">Rallysprint</a></li>
<li><a href="montana.html" rel="contenedor">Montaņa</a></li>
<li><a href="slalom.html" rel="contenedor">Slalom - Autocross</a></li>
<li><a href="karting.html" rel="contenedor">Karting</a></li>

<div id="contenedor">

<script type="text/javascript">
var pruebas=new ddajaxtabs("pruebas_tab", "contenedor")
pruebas.setselectedClassTarget("link") //"link" or "linkparent"

this is an external file containing a list:

<div id="navcontainer">
<ul id="navlist">
<li><a href="azpeitia.html" onClick="pruebas.loadajaxpage('azpeitia.html');map.setCenter(new GLatLng(43.18215902888734, -2.2120470642089844), 13);return false;">14 de Marzo - Rallysprint de Azpeitia-Ikasberri</a></li>
<li><a href="karrantza.html" onClick="pruebas.loadajaxpage('karrantza.html');map.setCenter(new GLatLng(43.21168197765769, -3.3956336975097656), 13);return false;">28 de Marzo - Rallysprint de Karrantza</a></li>
<li><a href="nanarri.html" onClick="pruebas.loadajaxpage('nanarri.html');map.setCenter(new GLatLng(43.07616079398851, -2.1042251586914062), 13);return false;">25 de Abril - Rallysprint &Ntilde;a&ntilde;arri</a></li>
<li><a href="azkoitia.html" onClick="pruebas.loadajaxpage('azkoitia.html');map.setCenter(new GLatLng(43.202235305520816, -2.3766517639160156), 13);return false;">9 de Mayo - Rallysprint Ayuntamiento de Azkoitia</a></li>

I tried to make this list a nested tab list that loads external pages in the same div (id="contenedor"); but as I can't disable the default selected tab thing, it always loads the first tab and I can never access the nested list.

I hope I could explain it clearly, otherwise I will upload the site and wiil post a link. thans in advance.