|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Just learning CF... quick question...
I've got a site setup using CF and ref'ing a MySQL db.
The news page I've created has the news category in the first row of a table and the news content in the second row. I'm attempting to get the subject row to be green should the category = id1 and red if the category = id2. However, I am at a loss. Can anyone give me any suggestions? This is my first CF site and first attempt to change table structure based on content. Thanks! I'm loving these boards! I already found an ASP solution while searching the other board. ![]() |
|
#2
|
|||
|
|||
|
A simple conditional check should do it:
<cfif category eq 'id1'> <cfset thisStyle = "greenStyle" /> <cfelseif category eq 'id2'> <cfset thisStyle = "redStyle" /> </cfif> <td class="#thisStyle#">data</tc>
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Just learning CF... quick question... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|