06-22-2002, 01:45 AM
I would like to change the bgcolor of a table data cell based on it's content.
Nothing fancy, just a color of red if the <td> cell contains any values.
I haven't done much with ASP but did quite a bit of work with Coldfusion some time ago.
Can you give me an idea of where to begin?
Thank You :)
06-22-2002, 11:07 PM
This is just a simple example. There are 100's of different ways to make it work. This is just a simple way. Think it speakse for itself? If not, contact met by email, or visit my website: http://www.paardekam.nl. Good luck!
IF someVar="someValue" THEN
Response.Write "<TD BGCOLOR=""#FFFFFF"">" & vbCrLf
Response.Write "<TD BGCOLOR=""#000000"">" & vbCrLf
06-23-2002, 04:08 AM
I thought it might look like what you've shown me but was uncertain as I haven't worked in Vb or done any work in ASP.
I am actually helping out another party here so if they need something more complicated I would probably pass them along.
Just out of curiosity what does the [ & vbCrlf ] refer to in the statemtent?
I appreciate the time and insight
06-23-2002, 12:27 PM
No problem. I'm glad to be of any help. The vbCrLf command stands for
Visual Basic Carriage Return Line Feed
That probably doesn't say much as well... When you're familiar with HTML, it can be considered as a <BR> tag, but then in the source code. It a line break. Just use it in your code and see what it does, by viewing your source-code. Good luck.
06-23-2002, 10:31 PM
I see what your saying on the vb code.
I have some basics in C at the moment.
Will be working a little more in that area in the
all insights always appreciated