Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor not changing to a hand on <A href> 2

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
GB
I have the following table, when I hover over it the cursor doesn't change to the hand. ?
can anybody see why ?

<TR VALIGN=TOP>
<a href=&quot;#&quot; onClick=&quot;window.parent.frames['Items'].location.href='ViewItemsRemoved.asp?ItemID=<%=Server.HTMLEncode(rs.Fields(&quot;Accom_RemovedID&quot;).Value)%>';return false;&quot;>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=1 FACE=&quot;Verdana&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;Accom_RemovedID&quot;).Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=1 FACE=&quot;Verdana&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;Block&quot;).Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=1 FACE=&quot;Verdana&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;Room_Number&quot;).Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=1 FACE=&quot;Verdana&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;Type&quot;).Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=1 FACE=&quot;Verdana&quot; COLOR=#000000><%=Server.HTMLEncode(rs.Fields(&quot;Size&quot;).Value)%><BR></FONT></TD>

</A>

</TR>
 
I created something similar and, like you, did not see the hand, and any text I included in the table cell was not underlined. However, the link did work.

I can't say why it won't show the hand/underline text. But if you wanted the hand, you could put it there with JavaScript.

For how to change the look of the cursor, look here:


Good luck.
 
hello,
I have looked at that link and can't get the spanning thing to work.

do you know if it has anything to do with the href=&quot;#&quot;
 
I don't think the &quot;#&quot; makes any difference. But since it can sometimes cause problems by going to the top of the page, I've always had better luck with href=&quot;&quot; as that truly does nothing.

The following code works for me in IE (as far as getting the link to work; the hand shows up when you actually click rather than when you hover). It's not tremendously different from yours. You could put the frame you're targeting for the link in the <a> tag, I believe, to get the desired behavior without JavaScript.


<html>
<body>
<table border=&quot;1&quot; width=&quot;100%&quot;>
<a href=&quot; <td width=&quot;50%&quot;>This is text</td>
<td width=&quot;50%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;50%&quot;>&nbsp;</td>
<td width=&quot;50%&quot;>&nbsp;</td>
</tr></a>
</table>
</body>
</html>

Hope that helps.
 
try this

<a href=&quot;javascript:;&quot; style=&quot;cursor: hand;&quot;.....>

or drop the <a> tag and replace with a <div> then frop the href as well and just go

<div onclick=&quot;....&quot; style=&quot;cursor: hand;&quot;>

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
decee's solution would work, too. I would suggest that you change the mouse to a hand &quot;onmouseover&quot; and then change it back (style=&quot;cursor: default) &quot;onmouseout.&quot;

Otherwise once you mouseover that table row, the cursor will always be a hand.
 
no need for that much coding, since style covers onmouseover and onmouseout as the style is only good while the mouse is in that tag.

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
thank you GreedyZebra ( classic username ! ) and deecee, together with your anwsers its now working !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top