|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Alternating row colors (depeding on data)
hi all ! I need to know how would I change the bgcolor of a table depending
on the string or the data that its analizing.
For example if the word A comes then all the rows for A should be blue if its B
then green and if its C yellow.
Im very new to javascript and I dont have a clue.
thanks a lot for al your help. |
|
#2
|
||||
|
||||
|
This is possible in Javascript using DOM features.
If I have time I'll write up an example. In the mean time, I highly recommend Google'ing for Javascript & DOM. There's many many uses for it. |
|
#3
|
|||
|
|||
|
Quote:
I already manage it using JSTL Thanks anyway |
|
#4
|
||||
|
||||
|
JSTL is a much better solution.
Javascript's DOM would have been tricky, and doing these types of calculations on the Clientside doesn't make the app very client-friendly. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Alternating row colors (depeding on data) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|