At a loss here. Have similar code working...
Cannot get hidden td or when changed to div it doesn't show either... This is not a coldfusion problem I don't think...
Required Javascript
<script type="text/javascript">
function showElement(layer){
var myLayer = document.getElementById(layer);
if(myLayer.style.display=="none"){
myLayer.style.display="block";
myLayer.backgroundPosition="top";
} else {
myLayer.style.display="none";
}
}
</script>
This Cold Fusion Code all works fine and displays fine in tables... When I add the function to hide it - I can't get it to display... The typeid is different each time...
<table cellpadding=2 cellspacing=2 align=center border=1>
<cfoutput query=list group="typeid">
<cfquery name="gl" datasource="#ds#">
select * from shindates
where sdate <= #monthdate# and stime >= #createODBCDateTime(timenow)# and typeid = '#typeid#'
order by typeid, sdate
</cfquery>
<cfquery name="type" datasource="#ds#">
select * from type
where typeid = '#typeid#'
</cfquery>
<tr>
<td><img src="../images/edit.png" alt="Edit" width=25 border=0 alt="Show List" onclick="javascript:showElement('#typeid#')"></td>
<td valign=middle class=verd10>#type.type#</td>
</tr>
<tr>
<td colspan=2 id="#typeid#" style="display: none">
<cfloop query="gl">
<table cellpadding=5 cellspacing=5 align=center class=general>
<tr>
<td colspan=2>
#type.type# - #Dateformat(gl.sdate, 'dddd - mmm dd, yyyy')# - #Timeformat(gl.stime, 'HH:mm')#<br>
</td>
</tr>
<tr>
<cfset csigned = signedup + gsignedup>
<cfif csigned is not 0>
<td class=verd9 align=center><b>Unable to Cancel - Users Signed Up</b></td>
<td class=verd9 align=center>
<cfform action="adminmanage.cfm?shinid=#gl.shinid#" method="post">
<input type="submit" value="Manage List" class="legal8">
<input type="hidden" value="#gl.shinid#" name="shinid">
</cfform>
</td>
<cfelse>
<td class=verd9 align=center>
<cfform action="adminlist.cfm?src=del" method="post">
<input type="submit" value="Cancel" class="legal8">
<input type="hidden" value="#gl.shinid#" name="shinid">
</cfform>
</td>
<td class=verd9 align=center>
<cfform action="adminmanage.cfm?shinid=#gl.shinid#" method="post">
<input type="submit" value="Manage List" class="legal8">
<input type="hidden" value="#gl.shinid#" name="shinid">
</cfform>
</td>
</cfif>
</tr>
</table>
</cfloop>
</td>
</tr>
</cfoutput>
</table>
Any help appreciated...