tag that shows hand on mouseover

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jul 2005
Posts: 60
Reputation: hinde is an unknown quantity at this point 
Solved Threads: 4
hinde hinde is offline Offline
Junior Poster in Training

tag that shows hand on mouseover

 
0
  #1
Apr 22nd, 2006
I need a tag that doesn't go anywhere when I click on it but will show the little hand with index finger outstretched like I am hovering over the text teh tag applies to. I googled for a while, but could not find anything related to what I am looking for. I need this because I am writing a file that will execute a javascript function when I click on it, which will display some new information, so I want it to appear to the user that he/she is clicking on a link.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: tag that shows hand on mouseover

 
0
  #2
Apr 22nd, 2006
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <A HREF="#">Link Here</A>
?
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 60
Reputation: hinde is an unknown quantity at this point 
Solved Threads: 4
hinde hinde is offline Offline
Junior Poster in Training

Re: tag that shows hand on mouseover

 
0
  #3
Apr 23rd, 2006
Thanks for the reply, but I found something even better, and I am a little embarrassed that I forgot I could do this.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <a href="javascript:display_spaces()">Get spaces</a>

Much simpler. Only thing is I usually hate these links cause I always click links with my middle mouse button to open a new tab in firefox lol.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 8
Reputation: iammatt is an unknown quantity at this point 
Solved Threads: 0
iammatt's Avatar
iammatt iammatt is offline Offline
Newbie Poster

Re: tag that shows hand on mouseover

 
0
  #4
Apr 26th, 2006
Originally Posted by hinde
Thanks for the reply, but I found something even better, and I am a little embarrassed that I forgot I could do this.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <a href="javascript:display_spaces()">Get spaces</a>
Much simpler. Only thing is I usually hate these links cause I always click links with my middle mouse button to open a new tab in firefox lol.
Or even simpler and "W3C Correct"
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <span style="cursor: hand;">Text with Hand Icon</span>

If you're feeling sassy you could even tie that span to a class and add that to the CSS file to keep your code cleaner and more efficent. Using an anchor when not needed is ghetto!
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: tag that shows hand on mouseover

 
0
  #5
Apr 26th, 2006
The last suggestion is the best. An anchor tag with the href set to "#" will navigate to the TOP of the page when clicked, which isn't quite the same thing as "go nowhere".

Similarly, using an empty JavaScript is... well, silly, in my opinion.

So I second IAMMATT's suggestion: just style a normal element, such as span, to display the hand cursor.

However, here's my standard scold: When a user sees their cursor turn to a hand, they expect that clicking will DO SOMETHING, in particular, that they will navigate somewhere.

So, creating an element that gives the hand cursor but that does nothing, violates the User Model, which is very nearly always a bad, bad idea.

EDIT: I re-read your original post. You want a hyperlink that runs a Javascript when clicked, so the
<a href="javascript:myFunction();">Run your function</a> is the proper method for this.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 50
Reputation: Esopo is an unknown quantity at this point 
Solved Threads: 1
Esopo Esopo is offline Offline
Junior Poster in Training

Re: tag that shows hand on mouseover

 
0
  #6
Apr 28th, 2006
Here is a whole thread on the matter with many alternatives:
http://www.expertsrt.com/phpBB2/view...d484e1acd201b5

I agree that using a dummy javascript call is best.
Site admin at NetBulge.com, a place set out to improve the web 1 good article at a time :)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 15120 | Replies: 5
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC