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]
- RE: js question John McCosker
- RE: js question Douglas.Knudsen
- RE: JS Question Matthew Walker
- RE: JS Question Shawn Grover
- RE: JS Question Tangorre, Michael
- RE: JS Question Dave Watts
- RE: JS Question Tangorre, Michael
- RE: JS Question Dave Watts
- RE: JS Question Tangorre, Michael
- RE: JS Question Pascal Peters
- RE: JS Question sudhakar ramaswamy
- RE: JS Question Michael T. Tangorre
- RE: JS Question Pascal Peters