Results 1 to 2 of 2

Thread: ajax tabs multiple nested tabs doesnt work?

  1. #1
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ajax tabs multiple nested tabs doesnt work?

    1) Script Title:
    Ajax Tabs Content Script 2.1

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

    3) Describe problem:
    I've followed the code for multiple ajax tabs with nested ajax tabs. Everything works fine when i have one instance of a nested tab, but loads into the parent page instead of into the ajax frame when i try and use multiple instances, depsite following the example in the documentation, which tells me to add the code as follows, which ive tampered with and cant get to work. if someone can tell me where i've gone wrong in a general example so i can re-edit the code to my page that would be an amazing help!!!!!!!

    <script>

    <ul id="countrytabs" class="shadetabs">
    <li><a href="external1.htm" rel="countrycontainer" class="selected">Tab 1</a></li>
    <li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
    <li><a href="externalnested.htm" rel="countrycontainer">Tab 3</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()

    countries.onajaxpageload=function(pageurl){
    if (pageurl.indexOf("externalnested.htm")!=-1){
    "
    "
    }
    else if (pageurl.indexOf("externalnested2.htm")!=-1){
    "
    "
    }
    else if (pageurl.indexOf("externalnested3.htm")!=-1){
    "
    "
    }{
    var provinces=new ddajaxtabs("provincetabs", "provincedivcontainer")
    provinces.setpersist(true)
    provinces.setselectedClassTarget("link") //"link" or "linkparent"
    provinces.init()
    }

    }

    </script>

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.

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
  •