JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 13th, 2005, 04:03 PM
juanmanuelsanch juanmanuelsanch is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 25 juanmanuelsanch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 31 m 27 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old March 14th, 2005, 08:23 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
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.

Reply With Quote
  #3  
Old March 14th, 2005, 12:29 PM
juanmanuelsanch juanmanuelsanch is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 25 juanmanuelsanch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 31 m 27 sec
Reputation Power: 0
Quote:
Originally Posted by MadCowDzz
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.


I already manage it using JSTL
Thanks anyway

Reply With Quote
  #4  
Old March 14th, 2005, 02:03 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Alternating row colors (depeding on data)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway