473,796 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1198
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******** ******@TK2MSFTN GP15.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
2697
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 selected its position was adjusted in accordance with the mouse move events. After migrating it to VB.NET I tried setting the PictureBox class's BorderStyle to Fixed3D or FixedSingle during the Mouse Down event. However, doing so seems to prevent...
10
7659
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 the onchange event isn't called when mouse wheel scrolling between A3 and B1, but it works properly when scrolling between A1 and A2. E.g. ------------------------------------------
5
4120
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", but nothing happened. Also, how can I set the mouse cursor to be an arrow when it hovers over these table cells? (It's an insertion bar now.) Thanks!
2
1105
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 writing a color like that : Menu1=new Array("rollover:visuels/communs/menu/presentation.gif:visuels/communs/menu// presentationON.gif","#","",2,25,101,"","","","","");
15
2468
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. ----------------------------- <script language="JavaScript"> <!-- function Ash_TopNavRollovers(TheObject); { TheObject.bgcolor="#000099;"; }
3
1257
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 code to do this is shown below: TABLE id="tblAddress" style="BORDER-RIGHT: navy 0.75pt solid; BORDER-TOP: navy 0.75pt solid; Z-INDEX: 103; LEFT: 8px; BORDER-LEFT: navy 0.75pt solid; BORDER-BOTTOM: navy 0.75pt solid; POSITION: absolute; TOP: 16px"...
3
2076
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 forecolor, backcolor and font. The labels also are rotatable and the text can also be flipped 180 degrees (the flipped text part is still being worked on). I have one context menu for all 30 labels that allows for the property changes to the labels....
2
1753
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 please help me.
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10465
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.