troubleshooting Question

Setting color of <td> using DHTML - question

Avatar of roger v
roger vFlag for United States of America asked on
Web DevelopmentCSS
9 Comments3 Solutions263 ViewsLast Modified:
Hi Experts,

I have a coldfusion page that displays records from a database. Some of these records might be empty, in which case the <td> element is empty with no text in it. I need a way to recognize if a <td> element is empty (does not have any data from the database) and then set the color of that td to red.

I could do this using  a bunch of if statements in coldfusion, but I was wondering if there is a more efficient way of doing this with dhtml/css. I found something online that mentioned a css pseudo class :contains to check the innerText, but I've never done this before and your guidance is needed. tia,

roger
ASKER CERTIFIED SOLUTION
level9wizard

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros