Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    215
    Thanks
    14
    Thanked 0 Times in 0 Posts

    need row to hyperlink...

    Hello all. I have a table in which I would like the whole row to act as a hyperlink. I have tried everything but the correct thing, so if anyone has any helpful suggestions, I would be more than appreciative. Here is what I have so far:

    Code:
    <tr onMouseOver="this.style.background='#FFFF99'" STYLE="cursor:hand;"  onmouseout="this.style.background='white';" onClick="<A HREF="Cust_Main.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "CustomerNo=" & rsCust_Info.Fields.Item("CustomerNo").Value %>"></A>">
          <td WIDTH="125"><%=(rsCust_Info.Fields.Item("Customer").Value)%></td>
          <td WIDTH="150"><%=(rsCust_Info.Fields.Item("CustomerID").Value)%></td>
          <td WIDTH="125"><%=(rsCust_Info.Fields.Item("City").Value)%></td>
          <td WIDTH="125"><%=(rsCust_Info.Fields.Item("State").Value)%></td>
          <td WIDTH="125"><%=(rsCust_Info.Fields.Item("Phone").Value)%></td>
          <td WIDTH="50"><div ALIGN="CENTER">
            <input TYPE="checkbox" NAME="checkbox" disabled="true" <% If (rsCust_Info.Fields.Item("Active").Value) = True Then %><% Response.Write (" checked")%><% else %><% Response.Write ("")%><% End If %> /></div></td>
          	  </tr>
    Thanks in advance,

    Parallon

  • #2
    New Coder
    Join Date
    Feb 2006
    Location
    Arizona, USA
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well this works, as a base. You'd have to use javascript for a link. But that may not be good because users can turn off javascript, and then your links won't work.

    Code:
    <html>
    <head>
    <title>yo</title>
    </head>
    <body>
    <table border="1" width="500">
     <tr onclick="javascript: alert('hello')">
      <td>
        Some stuff in row</td>
     </tr>
    </table>
    </body>
    </html>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •