Results 1 to 3 of 3

Thread: Need help in Nested Ajaxtabs

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

    Default Need help in Nested Ajaxtabs

    1) Script Title: Help required in Nested Ajaxtabs

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

    3) Describe problem: Please visit my site www.sreedesaienterprises.com where i have implemented your Nested Ajax Tabs Content script v2.2. Please go to Central Excise>Notifications. Here you will see two tabs:1) Non Tariff and 2) Tariff. I am not able to load the external files (cex_nt_notfn.html and cex_t_notfn.html respectively) in these two tabs. As you can see if i click Non Tariff/Tariff i am taken to a new window. I want the content to appear within the divcontainer meant for the each of the tabs: Non Tariff and Tariff separately. As you can also see the "loading content" script is also not functioning. Please help. Thanks in advance.

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

    Default

    It seems you have 3 levels deep of Ajax tabs in this case, so:

    1)Central Excise > 2) Notifications > 3) Non Tariff

    For each level, you'll need to define a new instance variable, and hook the "onajaxload" event to that variable. You only have two right now. The correct way to do a 3 levels tabs is something like:

    Code:
    var ajaxtabs=new ddajaxtabs("ajaxtabs", "ajaxdivcontainer")
    ajaxtabs.setpersist(true)
    ajaxtabs.setselectedClassTarget("link") //"link" or "linkparent"
    ajaxtabs.init()
    
    ajaxtabs.onajaxpageload=function(pageurl){
    if (pageurl.indexOf("central_excise.html")!=-1){
    	var centralexcisetabs=new ddajaxtabs("centralexcisetabs", "centralexcisedivcontainer")
    	centralexcisetabs.setpersist(true)
    	centralexcisetabs.setselectedClassTarget("link") //"link" or "linkparent"
    	centralexcisetabs.init()
    	centralexcisetabs.onajaxpageload=function(pageurl){
    		if (pageurl.indexOf("notifications.html")!=-1){
    			var notificationstabs=new ddajaxtabs("notificationstabs", "notificationsdivcontainer")
    			notificationstabs.setpersist(true)
    			notificationstabs.setselectedClassTarget("link") //"link" or "linkparent"
    			notificationstabs.init()
    		}
    		if (pageurl.indexOf("service_tax.html")!=-1){
    			var servicetaxtabs=new ddajaxtabs("servicetaxtabs", "servicetaxdivcontainer")
    			servicetaxtabs.setpersist(true)
    			servicetaxtabs.setselectedClassTarget("link") //"link" or "linkparent"
    			servicetaxtabs.init()
    		}
    	}
    }
    The above is untested, so you'll want to check for any errors. But the basic idea is there.
    }
    DD Admin

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

    vidya (10-31-2008)

  4. #3
    Join Date
    Oct 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Need help in Nested Ajaxtabs

    Hello Sir,
    I am very grateful for your prompt reply on my post. Words can not justify how much i am grateful to you for your directions. The code indeed contained one error i.e., the position of some of the code was to be different. I have corrected the same and is as follows:
    var ajaxtabs=new ddajaxtabs("ajaxtabs", "ajaxdivcontainer")
    ajaxtabs.setpersist(true)
    ajaxtabs.setselectedClassTarget("link") //"link" or "linkparent"
    ajaxtabs.init()

    ajaxtabs.onajaxpageload=function(pageurl){
    if (pageurl.indexOf("central_excise.html")!=-1){
    var centralexcisetabs=new ddajaxtabs("centralexcisetabs", "centralexcisedivcontainer")
    centralexcisetabs.setpersist(true)
    centralexcisetabs.setselectedClassTarget("link") //"link" or "linkparent"
    centralexcisetabs.init()
    }
    if (pageurl.indexOf("service_tax.html")!=-1){
    var servicetaxtabs=new ddajaxtabs("servicetaxtabs", "servicetaxdivcontainer")
    servicetaxtabs.setpersist(true)
    servicetaxtabs.setselectedClassTarget("link") //"link" or "linkparent"
    servicetaxtabs.init()
    }
    centralexcisetabs.onajaxpageload=function(pageurl){
    if (pageurl.indexOf("notifications.html")!=-1){
    var notificationstabs=new ddajaxtabs("notificationstabs", "notificationsdivcontainer")
    notificationstabs.setpersist(true)
    notificationstabs.setselectedClassTarget("link") //"link" or "linkparent"
    notificationstabs.init()
    }
    }
    }
    The 3rd level tabs are now working thanks to your prompt help. Please check it out! If you need any help i will gratefully help you. Thanks once again!

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
  •