This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes check tr background color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "check tr background color" Watch "check tr background color" New topic
Author

check tr background color

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
how to judge a tr background color ?


in the coding above, it always shows "ffffffffffffff", but actually it sets and displays tr background color as "#66FF99".

The logic is , first time user clicks one tr, it change background color, when user clicks it again (like unselect), the color will be changed back.

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
debug this:

alert(tr.style.backgroundColor);

what does it say

Eric
Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
--- #66FF99
Maybe some empty space? I need to trim it?

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://radio.javaranch.com/pascarello/2005/05/19/1116513366466.html
Eric
Liu Zhixiang
Ranch Hand

Joined: Aug 12, 2006
Posts: 32
Are you sure it's #66FF99 (instead of #66ff99 )?


Eric's method is good!
[ September 21, 2006: Message edited by: Liu Zhixiang ]

I Think Therefore I Am
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: check tr background color
 
Similar Threads
Data truncation: Truncated incorrect DOUBLE value:
Color Table Rows Based on a Field Value
Struts-2 Action class issue
selecting dynamically generated rows of a table
when select the checkbox how to display update link