Check this out. Enjoy.
<!--Style Sheet To Control Visibility-->
<style type="text/css">
.hidden {display:none}
.visible {display:block}
</style>
<!--Javascript to change the class of the data object-->
<script language="javascript">
function visibility(){
if(data.className == 'visible'){
data.className = 'hidden';
}else{
data.className = 'visible';
}
}
</script>
<!--Code to trigger javascript function, you can put this around an image-->
<a href="javascript:visibility()">Click here to show data</a>
<br><br>
<!--Sample Div tag, note the id of the tag matches the refernece in the function-->
<div id="data" class="hidden">
This is where you would output all of the data
</div>
<CFQUERY DATASOURCE="myDataSource" NAME="myQuery">
select name from emp
</CFQUERY>
<!--Style Sheet To Control Visibility-->
<style type="text/css">
.hidden {display:none}
.visible {display:block}
</style>
<!--Javascript to change the class of the data object-->
<script language="javascript">
function visibility(){
if(data.className == 'visible'){
data.className = 'hidden';
}else{
data.className = 'visible';
}
}
</script>
<!--Code to trigger javascript function, you can put this around an image-->
<a href="javascript:visibility()">Click here to show data</a>
<br>
<!--Sample Div tag, note the id of the tag matches the refernece in the function-->
<div id="data" class="hidden">
<CFOUTPUT QUERY="myQuery">
#Name#<br>
</CFOUTPUT>
</div>
----------------------------------
Software Engineer | DBA
Prosodie Interactive
www.prosodieinteractive.com
www.ivrinc.com