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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onMouseOver="change cursor style = pointer" How? 2

Status
Not open for further replies.

casabella

Programmer
Aug 30, 2007
59
0
0
US
I want to change my cursor from text to pointer when it is placed over a cell. How can I do this?

Regards,


Jose
 
I know better than to ask a question before trying "search" and "faq". I did search but not faq ...

Works great!

Thank you very much,


Jose
 
casabella, you might want to look into the cursor css property - that way you can avoid a javascript solution altogether:


-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
what Kaht said was correct, just add the style="cursor:pointer" to whatever cell you need the mouser over pointer on.

Code:
<html>
<head>

</head>

<body onload="">
<table border="1">
	<tr>
	<td>21321</td><td>321312</td><td>321312</td><td>321312</td><td style="cursor:pointer;">321312</td>
	</tr>

</table>
</body>
</html>
 
Good point!

I already use CSS, might as well add an entry for the mouse.

NOTE: The JS suggestion works just fine but the CSS it might a better way to go as it makes it universal without the additional overhead.

Thanks,


Jose
 
Um - isn't this the Javascript forum - I was just trying to be topical. [pumpkin]

But I'm glad that casabella gets the needed answer so it is all good [yoda].

Einstein47
“Evil abounds when good men do nothing.“ - Nelson R.
[&#91;]Starbase47.com]
 
Yes, it is the javascript forum, but in teaching others to be better javascripters that means we should point out when better non-javascript solutions exist so as to promote better coding practices. Using ActiveX, javascript can do a little bit of everything, but I still do not suggest it to most posters [smile]

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top