Your code modified a little.
Works on IE 6.0.

<cfoutput>
<cfloop from="1" to="5" index="x">
<table>
  <tr><td><a href="" return false;">Company #x#</a></td></tr>
</table>

<table style="display:none;" id="tbl#x#"> .... trimmed off .. #x# .... </table>

</cfloop>

<SCRIPT language="_javascript_">

//initialize to some unused value
var currentElement = '0';


function toggleDrillDown(x){

//return if clicking the same element
if(x == currentElement){
return
}
//if different element and current element !=0 hide current element
else if (currentElement != '0'){
document.getElementById(currentElement).style.display = 'none';   
}

//set the currentElem to this
currentElement = x;

//now unhide the new element.
    document.getElementById(x).style.display = 'block';
}  

</SCRIPT>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to