• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 671
  • Last Modified:

hover rows on jsp

I would like to highlight row when mouse hover on the row. I already have jsp generated the rows but wondering how can I add highlight on the row when mouse hover on it. Thanks.
0
askJava2
Asked:
askJava2
2 Solutions
 
InteractiveMindCommented:
Can we see some code please?
0
 
lamerhooDJVCommented:
Maybe I'm not understanding this, but couldn't you just use a simpe onmouseover, etc?

EG:

<td class="menu" onmouseover="bgColor='#CCCCCC'" onmouseout="bgColor='#999999'"><a href=?nav=welcome>Home</a><BR></td>

an example is at http://beta.cowlitzcounty.biz :) (the navigation bar)
0
 
suprapto45Commented:
Hi,

I think that lamerhooDJV solution should work for you based on my understanding. Please let us know if you need any help.

Regards
Dave
0
 
MogalManicCommented:
You can also put the onmouseover and onmouseout events on the <tr> tag like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta
 content="text/html; charset=ISO-8859-1"
 http-equiv="content-type" />
  <title />
</head>
<body>
<table width='66%' border="1" cellpadding="0" cellspacing="0">
    <tr onmouseover="bgColor='#ffff33'" onmouseout="bgColor='#ffffff'" bgcolor="#ffffff">
      <td>Row1</td>
      <td>data1</td>
    </tr>
    <tr onmouseover="bgColor='#ffff33'" onmouseout="bgColor='#ffffff'" bgcolor="#ffffff">
      <td>Row2</td>
      <td>data2</td>
    </tr>
</table>
</body>
</html>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now