how to link to another page using hover

i have a row with 5 column.
i want my first column able to link to other page
i want to use hover so that whenever i point to first column an underline occur and the row change to another color.

LVL 7
tankergoblinAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BrianMMConnect With a Mentor Commented:
Hi,

This should do it.
<table width="100%" cellpadding="0" cellspacing="0">
	<tr style="cursor:pointer;width: 250px;" onclick="javascript:location='index.php?mod=batch&act=create'" onmouseover="style.backgroundColor='#A0A0A4';cursor: pointer; cursor: hand;" onmouseout="style.backgroundColor=''">
		<td>row 1 col 1</td>
		<td>row 1 col 2</td>
	</tr>
	<tr style="cursor:pointer;width: 250px;" onclick="javascript:location='index.php?mod=batch&act=create'" onmouseover="style.backgroundColor='#A0A0A4';cursor: pointer; cursor: hand;" onmouseout="style.backgroundColor=''">
		<td>row 2col 1</td>
		<td>row 2 col 2</td>
	</tr>
	<tr style="cursor:pointer;width: 250px;" onclick="javascript:location='index.php?mod=batch&act=create'" onmouseover="style.backgroundColor='#A0A0A4';cursor: pointer; cursor: hand;" onmouseout="style.backgroundColor=''">
		<td>row 3 col 1</td>
		<td>row 3 col 2</td>
	</tr>
</table>

Open in new window

0
 
darenceangCommented:
Not sure if this could help...

<body onMouseOver="location.href='http://www.yahoo.com/';"
bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000">

Open in new window

0
 
BrianMMCommented:
just remove the onlick, if you want the specific link aspect...
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
bored321Commented:
Think this is what you are after.
<table width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td style="cursor:pointer; width: 200px;" onclick="javascript:location='yourpage.htm'" onmouseover="style.backgroundColor='#eee'; style.textDecoration='underline'; cursor: pointer; cursor: hand;" onmouseout="style.backgroundColor=''; style.textDecoration='none';">row 1 col 1</td> <td>row 1 col 2</td> <td>row 1 col 3</td> <td>row 1 col 4</td> <td>row 1 col 5</td>
  </tr>
</table>

Open in new window

0
 
BrianMMCommented:
That will only change the colour of the 1st cell, question states row to change colour.
0
 
tankergoblinAuthor Commented:
BrianMM:
Your idea looks good but i think is not efficient to declare cursor pointer in every row .
you know any jquery that can do this?
0
 
tankergoblinAuthor Commented:
BrianMM:
Your idea looks good but i think is not efficient to declare cursor pointer in every row .
you know any jquery that can do this?
0
 
BrianMMCommented:
you can assign using a css class. My code was purley a rough guide to show the mechanism.
0
 
BrianMMCommented:
Have been doing this for years... if you can explain & prove this it would be interesting.
0
All Courses

From novice to tech pro — start learning today.