View Full Version : Complicated Ajax Tabs implementation

02-28-2008, 06:05 PM
1) Script Title:
Ajax Tabs v2.0

2) Script URL (on DD):

3) Website:

4) Describe problem:

This is fairly complex and I've had help from you guys getting it to work one way, but I am changing it a bit.

I have a nested tabs page within a tabs page. (See Our Product tab on website). I want to load one of the sub tabbed pages (Our Product > Pricing and Specs) when you click the "Product Pricing and Specs" link on the right "Popular Places" container.

So in other words I want a tab of a tab to open in my main "countries" container when a link is clicked from outside the tabs menu....make sense?

I've beat my brain on how to do this and can't come up with a solution. Any suggestions? Can it even be done?

Thanks in advance.

02-28-2008, 06:20 PM
Maybe this thread will help you, it's not for the Ajax tabs but it's for the similar tabbed content script...it might help (or not)....good luck!


02-28-2008, 06:44 PM
Thanks for the suggestion, but I can't get it to work. It looks more like a solution to v1 of the script.

02-28-2008, 10:49 PM
There are many ways to select a nested tab from outside the tabs interface itself. The easiest way is to add to your onajaxpageload event handler the code in red below:

if (pageurl.indexOf("externalnested.htm")!=-1){
var provinces=new ddajaxtabs("provincetabs", "provincedivcontainer")
provinces.setselectedClassTarget("link") //"link" or "linkparent"
if (typeof nestedtabindex!="undefined" && nestedtabindex>-1)

This registers a variable nestedtabindex that you can set anywhere on your page to select the "x" nested tab (0=1st tab). So for example, you may have:

<a href="#" onClick="countries.expandit(1); nestedtabindex=2">Select "2nd" tab</a>

This link when clicked on first selects the 2nd main tab, and when its Ajax Content loads, selects the 3rd nested tab within it.

02-29-2008, 06:32 PM
That worked great. Thanks!