473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to chang bgcolor of row when mouse selected a row?

How to chang bgcolor of row when mouse selected a row?

I have a HTML table in the page. I hope to change <tr.bgcolor> when user
clicks on a column, just like user has selected this row.

How can I do that ?

Thanks

Charles Shao:-)
Nov 19 '05 #1
1 1181
You should setup client-side onclick event for evry <tr>. In the event
handler you can change bgcolor for the new-clicked row and restore normal
color for the previously clicked row. Store the reference to the
previously-clicked row in a javascript variable.

Eliyahu

"Charles Shao" <ad****@263.net> wrote in message
news:OK**************@TK2MSFTNGP15.phx.gbl...
How to chang bgcolor of row when mouse selected a row?

I have a HTML table in the page. I hope to change <tr.bgcolor> when user
clicks on a column, just like user has selected this row.

How can I do that ?

Thanks

Charles Shao:-)

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephen Williams | last post by:
I am migrating a VB 6 PictureBox control to VB.NET. In VB 6, this control modified its border style during the mouse down and up events to provide user feedback that it was selected. Once...
10
by: Ryan McGeary | last post by:
In a <select> drop-down, the onchange event isn't called when scrolling through the dropdown using the mouse-wheel and when crossing over a new <optgroup>. Using the example below, notice how...
5
by: kj | last post by:
Is there a way to dynamically (e.g. upon onClick) change the bgColor attribute of a table cell? I tried cell.setAttribute("bgColor", someColor), where someColor was a string of the form "#RRGGBB",...
2
by: Ariodante | last post by:
Hello, I am a user of Dynamic Drives' HvMenu. It works fine, but just tried to get different colors for subtitles (as said in the config.htm of the documentation) and get a problem. When...
15
by: @sh | last post by:
Trying to do this, but its not working...?! My aim being to change the bgcolor of the cell upon which the user has rolled over, I'll then replicate this as an OnMouseOut to change it back. ...
3
by: Peter Merwood | last post by:
Hi I've developed a simple ASP.NET page using Visual Studio 2003. On the page are a number of tables which I have shaded the background of using the bgcolor table attribute/property. My HTML...
3
by: jcrouse | last post by:
I have created a form designer type application (with a lot of you peoples helpJ). It has label controls that are draggable at runtime. The user is also allowed to change some properties such as...
2
by: leena | last post by:
My code is this <td bgcolor="#EBEBD8" onMouseOver="bgColor='#CBCBB8'"onMouseOut="bgColor='#EBEBD8'"> i want to put same hover colour on onclick function so how i write that code. If anybody know...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.