1) Script Title: Accordion Content
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm
3) Describe problem: I have spent the better part of four days trying to get a nested accordion which fetches Ajax content to work.
A stripped-down version is here: http://www.themacdonaldcase.com/test_dda/test.html
A user should be able to click "A" or "B" and get a list of "A" names or "B" names, each one of which can also be clicked to open and close and show content about each person.
Everything works in IE8 (both locally and live), but neither Chrome nor Firefox will fetch the Ajax content properly.
Locally and live, when I click "A" or "B," Firefox (22.0) just give me a blank screen and "Connecting."
Chrome (local): When I click "A" or "B," they "jump" a little, but nothing opens.
Chrome (live): The screen goes white when "A" or "B" is clicked.
Here's a snippet of the main header code (styles not shown):
Code:
<HEAD>
//Initialize MAIN content:
ddaccordion.init({
headerclass: "technology", //Shared CSS class name of headers group
contentclass: "thelanguage", //Shared CSS class name of contents group
....
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})
</HEAD>
<BODY>
<h3 class="technology">"A" names</h3>
<div class="thelanguage">
<a class="hiddenajaxlink" href="A.htm">A</a>
</div>
</BODY>
And here's a snippet from one of the fetched Ajax pages (styles not shown):
Code:
<HEAD>
//Initialize SUB content:
ddaccordion.init({
headerclass: "Aheader", //Shared CSS class name of headers group
contentclass: "Acontent", //Shared CSS class name of contents group
....
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})
</HEAD>
<BODY>
<h3 class="Aheader">Aaron</strong></h3>
<div class="Acontent">
<BR>Biography for Aaron goes here.
<BR><BR>
</div>
</BODY>
Side note: Most accordion scripts I've tried require unique identifieers for each content group. I have no probem with creating unique IDs for the A through Z main headers, but there are thousands of individual names in total, and it would be impractical and very labor-intensive to create unique IDs for each name. That's why I chose the Accordion Content script, because it doesn't need unique IDs for the various headers.
I've tried just about everything I know to do, including adapting the script shown on this page. I also tried using the Switch Content script (DD http://www.dynamicdrive.com/dynamici...tchcontent.htm) for the main A-Z headers, and the Accordion Content script for the sub-content. I've also tried putting all scripts in the main page and none on the fetched pages; I've tried putting all scripts on the fetched pages and none on the main page; I've tried putting the top-level scripts on the main page and sub-level scripts on the sub-pages, but nothing works.
Can someone please help? I don't have much hair left at this point since I've ripped most of it out trying to figure out why my Ajax content doesn't get fetched in Chrome or Firefox.
I came back to edit this post to say that I hope I didn't post this in the wrong place. I just realized that the topic here is Accordion Menu, not Accordion Content. If I need to repost elsewhere, please let me know. Thank you.
Bookmarks