How can you use the output of a <cfif> block that is embedded in a <cfoutput
query> outside of the </cfoutput> without having to repeat the <cfif> block
. It seems silly to repeat these blocks.
This is a sample of what I mean. This code is purely an scenario of what I
want to accomplish, it of course won't work like this.
<CFLOOP index="test" from="1" to="20">
<CFOUTPUT query="query">
<CFIF (#test# EQ #datatable#)>
<CFSET CheckImage = "check.gif">
<CFELSE>
<CFSET CheckImage = "blank.gif">
</CFIF>
</CFOUTPUT>
<CFOUTPUT query="query">
<CFIF (#test# EQ #datatable#)>
<CFSET BookColor = "White">
<CFIF datatable10 EQ 4>
<CFSET TableBookColor = "Red">
<CFELSEIF datatable10 EQ 3>
<CFSET TableBookColor = "Blue">
<CFELSEIF datatable10 EQ 2>
<CFSET TableBookColor = "Green">
</CFIF>
<CFELSE>
<CFSET BookColor = "Black">
<CFSET TableBookColor = "White">
</CFIF></CFOUTPUT>
<tr>
<td><CFOUTPUT><img src="../images/#CheckImage#"</CFOUTPUT></td>
<td bgcolor = "#TableBookColor #">
<font color = "#BookColor#">
<CFOUTPUT query="query"><CFIF (#test# EQ
#datatable#)>#datatable1#</CFELSE>--</CFIF></CFOUTPUT></td>
<td bgcolor = "#TableBookColor #">
<font color = "#BookColor#">
<CFOUTPUT query="query"><CFIF (#test# EQ
#datatable#)>#datatable2#</CFELSE>--</CFIF></CFOUTPUT></td>
<td bgcolor = "#TableBookColor #">
<font color = "#BookColor#">
<CFOUTPUT query="query"><CFIF (#test# EQ
#datatable#)>#datatable3#</CFELSE>--</CFIF></CFOUTPUT></td>
<td bgcolor = "#TableBookColor #">
<font color = "#BookColor#">
<CFOUTPUT query="query"><CFIF (#test# EQ
#datatable#)>#datatable4#</CFELSE>--</CFIF></CFOUTPUT></td>
</tr>
</CFLOOP>
Any Idea's, Thanks in advance for any suggestions.
-Mark :o)
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.