Results 1 to 3 of 3

Thread: nesting with ajaxtab

  1. #1
    Join Date
    Jul 2007
    Posts
    59
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default nesting with ajaxtab

    1) Script Title:
    ajaxtabs 2
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...uppliment2.htm
    3) Describe problem:

    if i have 10 tabs in the 2nd sub-level tabs and 20 in the 3rd sub-level tabs

    do i have to put all this code 1 by 1 thank
    PHP Code:
    countries.onajaxpageload=function(pageurl){
    if (
    pageurl.indexOf("menu_contact.php")!=-1){
    var 
    provinces=new ddajaxtabs("subtab""ajax2")
    provinces.setpersist(true)
    provinces.setselectedClassTarget("linkparent"//"link" or "linkparent"
    provinces.init()

    Last edited by jackavin; 10-24-2007 at 02:40 AM.

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

    Default

    You would need to do the above for each level. For example, the below is a 3 level nested tabs declaration:

    Code:
    countries.onajaxpageload=function(pageurl){ 
     if (pageurl.indexOf("menu_contact.php")!=-1){ 
      var provinces=new ddajaxtabs("subtab", "ajax2") 
      provinces.setpersist(true) 
      provinces.setselectedClassTarget("linkparent") //"link" or "linkparent" 
      provinces.init()
      provinces.onajaxpageload=function(pageurl){
       if (pageurl.indexOf("test.php")!=-1){
        city.setpersist(true) 
        city.setselectedClassTarget("linkparent") //"link" or "linkparent" 
        city.init()
       }
      }
     }
    }

  3. #3
    Join Date
    Jul 2007
    Posts
    59
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    i got it
    Last edited by jackavin; 10-24-2007 at 05:43 PM.

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
  •