how about this script. I think this is closer to what you want.
Basically, you can create as many boxes as you like and put the descriptions in the boxes (DIV tags).
<script>
function expand(divID) {
var layer="document.all", style=".style";
if (document.all) layer="document.all";
else if (document.layers) { layer="document.layers"; style=""; }
else layer="dom";
if (layer=="dom") {
if (document.getElementById(divID).style.height!="1px")
document.getElementById(divID).style.height="1px";
else
document.getElementById(divID).style.height="100px"; }
else {
if (eval(layer+"[divID]"+style).height!="1px")
eval(layer+"[divID]"+style).height="1px";
else
eval(layer+"[divID]"+style).height="100px"; } }
</script>
<a href=# onclick="expand('box1');">expand/collapse</a>
<div id="box1" style="height:100px;border:1px solid #000000;overflow:auto">Your description 1.</div>
<a href=# onclick="expand('box2');">expand/collapse</a>
<div id="box2" style="height:100px;border:1px solid #000000;overflow:auto">Your description 2.</div>
I put expand/collapse there but you can make it look better by putting an up/down image there instead. You can also change the image to up or down depending on whether the box is expanded or collapsed.
Reply