Unfortunately ASP is completely alien to me. However, as long as you can get ASP to output the content to contract/expand per the script's structure, it really shouldn't matter. This structure as shown in the demo is:
Code:
<!--Optional Expand/ Contact All links. Remove if desired-->
<div style="margin-bottom: 5px"><a href="javascript:sweeptoggle('contract')">Contract All</a> | <a href="javascript:sweeptoggle('expand')">Expand All</a></div>
<div class="headers"><img src="minus.gif" class="showstate" onClick="expandcontent(this, 'sc1')" />What is JavaScript?</div>
<div id="sc1" class="switchcontent">
CONTENT 1
</div>
<br />
<div class="headers"><img src="minus.gif" class="showstate" onClick="expandcontent(this, 'sc2')" />Difference betwen Java & JavaScript?</div>
<div id="sc2" class="switchcontent">
CONTENT 2
</div>
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="headers"><img src="minus.gif" class="showstate" onClick="expandcontent(this, 'sc3')" />What is DHTML? (table example)</td></tr>
<tr><td id="sc3" class="switchcontent">
CONTENT 3
</td></tr>
</table>
As long as you can get ASP to output the correct container tags, whether it's a DIV or a table, then insert the content to expand/contract per the code in red above, it will work. Your ASP must also input the appropriate ID and onClick codes, and increment the IDs accordingly like above.
Bookmarks