Results 1 to 2 of 2

Thread: Ajax Links Nested to Different Div's

  1. #1
    Join Date
    May 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Links Nested to Different Div's

    1) Script Title: Ajax Tabs Content Script (v 2.2)

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

    3) Describe problem: I attached a screenshot for reference...I am having a problem nesting the ajax links. I managed to get it to work using the instructions given here. The issue I'm having is with the selected links. The first link in section 1 is selected which automatically populates the second section and that link is selected which automatically populates the third section.

    I do not want anything selected at first and once the first link is clicked then the second link has to be click to populate section three.

    I hope this makes sense.

    This is the javascript I am currently using.

    Code:
    <script type="text/javascript">
    
    var courses=new ddajaxtabs("profiletabs", "ajaxCourses")
    courses.setpersist(false)
    courses.setselectedClassTarget("link") //"link" or "linkparent"
    courses.init()
    
    
    courses.onajaxpageload=function(pageurl){
    if (pageurl.indexOf("courses.php")!=-1){
    provinces=new ddajaxtabs("coursetabs", "ajaxNotes")
    provinces.setpersist(false)
    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

    The script was designed to automatically select the first tab of each set in the absence of any user defined or persisted selected tab. To get it to not select the first tab in this case, inside the .js file, find the below two lines and comment them out (in red):

    Code:
    		//else //if no valid default selected index found
    			//this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
    DD Admin

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
  •