Solved

how to link to another page using hover

Posted on 2009-05-18
9
277 Views
Last Modified: 2012-05-07
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.

0
Comment
Question by:tankergoblin
9 Comments
 
LVL 4

Expert Comment

by:darenceang
ID: 24410495
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
 
LVL 11

Accepted Solution

by:
BrianMM earned 500 total points
ID: 24410506
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
 
LVL 11

Expert Comment

by:BrianMM
ID: 24410513
just remove the onlick, if you want the specific link aspect...
0
 
LVL 5

Expert Comment

by:bored321
ID: 24410586
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 11

Expert Comment

by:BrianMM
ID: 24410705
That will only change the colour of the 1st cell, question states row to change colour.
0
 
LVL 7

Author Comment

by:tankergoblin
ID: 24417777
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
 
LVL 7

Author Comment

by:tankergoblin
ID: 24417779
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
 
LVL 11

Expert Comment

by:BrianMM
ID: 24419830
you can assign using a css class. My code was purley a rough guide to show the mechanism.
0
 
LVL 11

Expert Comment

by:BrianMM
ID: 24431969
Have been doing this for years... if you can explain & prove this it would be interesting.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
WooCommerce Sort by Date 4 9
razorCMS: Change Menu Font 4 26
Cordova Camera plugin fails 2 21
Adding through query php 9 11
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now