onclick to a href link for a table row

how can i have an html table row to be a hotspot to be clickable

something like
...
<tr onclick="newpage.html" >

note that this is not to be a new window pop-up, just a simple link

thanks
willsherwoodAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mel_PembleCommented:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
      <title>Title Row Select</title>
      <script type="text/javascript">
      function loadUrl(sUrl){
         document.location.href = sUrl;
      }
      </script>
   </head>
   <body>
      <table width="100%" border="1" cellpadding="0" cellspacing="0">
         <tr onclick="loadUrl('http://www.yahoo.com/');">
            <td>a</td>
            <td>b</td>
            <td>c</td>
         </tr>
         
         <tr onclick="loadUrl('http://www.microsoft.com/');">
            <td>a</td>
            <td>b</td>
            <td>c</td>
         </tr>
         
         <tr onclick="loadUrl('http://www.google.com');">
            <td>a</td>
            <td>b</td>
            <td>c</td>
         </tr>
      </table>
   </body>
</html>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ncooCommented:
Almost, just need the window.location bit.
<tr onclick="window.location = 'newpage.html';" >

Open in new window

willsherwoodAuthor Commented:
super, many thanks!
willsherwoodAuthor Commented:
how to get the cursor to change to pointer when hovering?
Mel_PembleCommented:
in the head add a style

        <style type="text/css">
        table tr:hover{
           cursor:pointer;
        }
        </style>


if you have multiple tables give the table a unique id, or the tr a class name and change the selectors accordingly
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.