Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2005, 08:04 AM
Authorized User
 
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent please HREF

Could U please help me out How to give HREF to the entire row with the under line( here the one row navigae to one page)
Here is my HTML block
<TABLE cellSpacing=1 cellPadding=1 width="75%" border=1>

  <TR>
    <TD>1</TD>
    <TD>2</TD>
    <TD>3</TD></TR>
  <TR>
    <TD>4</TD>
    <TD>5</TD>
    <TD>6</TD></TR>
  <TR>
    <TD>7</TD>
    <TD>8</TD>
    <TD>9</TD></TR>
    </TABLE></P>

 
Old September 26th, 2005, 08:09 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I assume you want to make an entire row a link?

If that is the case, you'll either need JavaScript, or to include each link individually in each cell.

The javascript is very simple.
Code:
<tr onclick='location.href = "http://www.example.com";'>
Add an underline, as though it were a normal link:
Code:
<tr onclick='location.href = "http://www.example.com";' style='text-decoration: underline; color: blue; cursor: pointer;'>
HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old September 26th, 2005, 08:17 AM
Authorized User
 
Join Date: Jul 2005
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this...

<tr onclick="javascript:location='http://yourDomain/yourPage.html';">
    <TD>1</TD> <TD>2</TD> <TD>3</TD>
</tr>








Similar Threads
Thread Thread Starter Forum Replies Last Post
using href in xslt rajesh_css XSLT 0 September 18th, 2008 02:44 AM
Chapter 8, href and HRef (p. 285) roman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 June 16th, 2008 10:40 AM
Help with HREF string bonekrusher XSLT 6 October 9th, 2006 05:33 AM
href darkhalf Javascript 2 November 20th, 2005 10:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.