View Full Version : Ajax Links Nested to Different Div's

05-03-2011, 06:45 AM
1) Script Title: Ajax Tabs Content Script (v 2.2)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

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 (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ajaxtabs_suppliment2.htm). 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.

<script type="text/javascript">

var courses=new ddajaxtabs("profiletabs", "ajaxCourses")
courses.setselectedClassTarget("link") //"link" or "linkparent"

if (pageurl.indexOf("courses.php")!=-1){
provinces=new ddajaxtabs("coursetabs", "ajaxNotes")
provinces.setselectedClassTarget("link") //"link" or "linkparent"



05-03-2011, 11:57 PM
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):

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