Table Rows color

liunx

Guest
I have seen a web site address is <br />
<!-- m --><a class="postlink" href="http://www.ameinfo.com/fn/top100/top100.html">http://www.ameinfo.com/fn/top100/top100.html</a><!-- m --><br />
<br />
Here is a table with colorful background. When we move the mouse pointer to a row, the back color of that particular row changed. I do not know how to perform it. Can any body provide the script for this process. I want to use it. <br />
<br />
This site's script is also sorting the table acording to click on headings.<br />
<br />
<br />
Thanks and regards,<!--content-->Hey,<br />
I used something like this for my menu, except it wasn't for entire rows. But I am sure you could use this code in a javscript function to implement it on the whole row.<br />
<br />
<td width=80 height=20 onMouseover="this.bgColor='0084a5'" <br />
onMouseout="this.bgColor='#4D5471'"><br />
<br />
When it calls the onMouseover event handler, it changes the background color of that cell to the according color, and onMouseout, changes it back to the original. This is of course inside a table element, but I hope this helps. Good luck.<!--content-->just view the source and learn from the code, just make sure you dont just copy and paste it!<!--content-->Thanks dears<br />
<br />
By using <td width=80 height=20 onMouseover="this.bgColor='0084a5'" <br />
onMouseout="this.bgColor='#4D5471'"> <br />
<br />
only column will be effected. I have changed it a little bit as<br />
<br />
<tr onMouseover="this.bgColor='red'" <br />
onMouseout="this.bgColor='white'"><br />
<td >Sindh</td><td>Karachi</td><br />
</tr><br />
<br />
Now it is working on whole row. I done this according to your help but it is working only in IE, not in Netscape. Is there any process that I can complete this thing on Netscape also.<!--content-->Dears<br />
<br />
I got script from <!-- m --><a class="postlink" href="http://www.dynamicdrive.com/dynamic...hlighttable.htm">http://www.dynamicdrive.com/dynamic...hlighttable.htm</a><!-- m -->[/url]<br />
<br />
and by applying a little changing, I am using it easily according to my purpose.<br />
<br />
The script at above site is useful for changing the color of column of tables, I changed it for complete rows. So when mouse pointer come onto a row, the color of entire row (not of its column) will be changed. Its a good script and for other users I am attaching a text file of this script.<br />
<br />
(The script is not working on Netscape. If any one has slution. Please reply)<br />
<br />
Thanks to all<!--content-->
 
Back
Top