Results 1 to 5 of 5

Thread: Complicated Ajax Tabs implementation

  1. #1
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Complicated Ajax Tabs implementation

    1) Script Title:
    Ajax Tabs v2.0

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...axtabscontent/

    3) Website:
    http://www.artisanmantels.com

    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.

  2. #2
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    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!

    http://www.dynamicdrive.com/forums/s...ad.php?t=29823

  3. #3
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the suggestion, but I can't get it to work. It looks more like a solution to v1 of the script.

  4. #4
    Join Date
    Aug 2004
    Posts
    9,894
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    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:

    Code:
    countries.onajaxpageload=function(pageurl){
    if (pageurl.indexOf("externalnested.htm")!=-1){
    var provinces=new ddajaxtabs("provincetabs", "provincedivcontainer")
    provinces.setpersist(true)
    provinces.setselectedClassTarget("link") //"link" or "linkparent"
    provinces.init()
    if (typeof nestedtabindex!="undefined" && nestedtabindex>-1)
    provinces.expandit(nestedtabindex)
    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:

    Code:
    <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.

  5. The Following User Says Thank You to ddadmin For This Useful Post:

    synergy (02-29-2008)

  6. #5
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That worked great. Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •