Hi,
I have some tables that get displayed when someone does a search
for a company for instance. In this table, it shows the company name,
the contact, address, company classification, etc. The company
classification field is just a way to tell us if the company is a key
account or not. They are labeled as an "A" if they are. What I would
like to do is to make the rows that have the company classification
labeled as an "A" to be a yellow color so users can tell if the
company is a key account right away or not. Does anyone know how to
get this to work correctly? I have attached only a little code. I
think this is where I will have to update it at. Can anyone help me?
Thanks.
Andy
<CFOUTPUT QUERY="CompanySearch" MaxRows="#MaxRows#"
Startrow="#Start#">
<tr>
<td>
<cfif Company Is Not "">
<a href="edit_contact.cfm?ContactID=#ContactID#">#Company#</a>
<cfelse> </cfif>
</td>
<td>
<cfif Company_Classification is not "">
#Company_Classification#
<cfelse>
</cfif>
</td>
</tr>
</CFOUTPUT>
jdeline - 27 Jul 2006 20:56 GMT
In the your <tr> tag, check to see if Company_Classification is "A". If it
is, add BGCOLOR="yellow" to the tag. See below.
<CFOUTPUT QUERY="CompanySearch" MaxRows="#MaxRows#"
Startrow="#Start#">
<tr <CFIF Company_Classification IS "A">BGCOLOR="yellow"</CFIF>>
<td>
<cfif Company Is Not "">
<a href="edit_contact.cfm?ContactID=#ContactID#">#Company#</a>
<cfelse> </cfif>
</td>
<td>
<cfif Company_Classification is not "">
#Company_Classification#
<cfelse>
</cfif>
</td>
</tr>
</CFOUTPUT>