javascript thread: SV: RE: SV: change rows color when clicked...
Well, if the event is in IE, for example, the event on the checkbox (to
make it clear: <input type=3D"checkbox" name=3D"value1">) will bubble up
to
the TR element...
And, if that is not sufficient, you can loop trough the TableRow's TD
elements and set their background color too
(either by checking parentElement up to the TR in the document hierarchy
of the check box etc, or by using the onClick event of the TR).
Another option is to set the background color with stylesheets, i.e.
element.style.backgroundColor and so on...
It can't be that hard now, can it?
/Robert
-----Ursprungligt meddelande-----
Fr=E5n: Awdhil [mailto:Awdhil@g...]
Skickat: den 20 september 2002 17:36
Till: javascript
=C4mne: [javascript] RE: SV: change rows color when clicked...
This will not work. Moreover the syntax says that the bgcolor is changed
to white if the row is clicked(ie u click on the row itself. I think,
wht the questioner wants is:
He prob has records from DB being displayed, and also a select box
for each record is created.
Each record occupies a row, with select taking a <td>.
On checking a select box, the bgcolor of that row should change.
Any answers?
Syed Awdhil Ahmed
September 12, 2002
-----Original Message-----
From: Robert Nyman [mailto:robert.nyman@c...]
Sent: Friday, September 20, 2002 4:28 PM
To: javascript
Subject: [javascript] SV: change rows color when clicked...
Is it rows in a table?
In that case:
<tr onClick=3D"this.bgColor =3D'blue'">
/Robert
-----Ursprungligt meddelande-----
Fr=E5n: trio javascript [mailto:triojavascript@y...]
Skickat: den 20 september 2002 14:12
Till: javascript
=C4mne: [javascript] change rows color when clicked...
i have some rows of data that i load from mysql...then i display to web
page...and each row have check box ...my problem is i want if the check
box is clicked then the rows background color will change ...(same like
when we delete emails in yahoo account , click and delete selected mail
) thanks sorry if my english is not good
---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20