View Full Version : Image w/ tooltip
JayGeePee
10-21-2008, 01:37 AM
1) Script Title: Image w/ tooltip
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...agetooltip.htm
3) Describe problem: I only want the image to appear when the user scrolls over the link. How do I keep the link from being clickable. I dont want the user to click the link, and leave the page.
jscheuer1
10-21-2008, 04:00 PM
The link to the dd script in your post is broken. Which script exactly are you talking about?
In any case, generally if you have a link:
<a href="whatever.htm">Link Text or img tag</a>
You can stop it from firing by:
<a href="whatever.htm" onclick="return false;">Link Text or img tag</a>
John is right, btw he was referring to this one:
http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm
I could tell by looking at the url:
dynamici...imagetooltip.htm
Then found where post the image effects were.
What you could also do is completely take AWAY the link for example:
<span onmouseover="doTooltip(event,1)" onmouseout="hideTip()">Text 1</a>
Or make a fake link.
Which is easy to make in css. But I suggest either Johns return solution, or my span solution.
JayGeePee
10-21-2008, 04:17 PM
Heres the right link, sorry about that.
http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm
How Do I keep this link from being clickable? And what is the correct way to use it. Im using a website creator called Blue Voda... Is hyperlinking this going to work? What do I do with it?
<a href="#" onmouseover="doTooltip(event,4)" onmouseout="hideTip()">Link 1</a>
Thanks, John
jscheuer1
10-21-2008, 06:42 PM
Is hyperlinking this going to work? What do I do with it?
<a href="#" onmouseover="doTooltip(event,4)" onmouseout="hideTip()">Link 1</a>
It is hyperlinked, and the hyperlink works. What you've been asking, as far as I can tell, is how to stop the hyperlink from working. For that, do it like so:
<a href="#" onclick="return false;" onmouseover="doTooltip(event,4)" onmouseout="hideTip()">Link 1</a>
Now, if instead of killing the hyperlink, you want it to go somewhere, you can just change the # to a URL:
<a href="some.htm" onmouseover="doTooltip(event,4)" onmouseout="hideTip()">Link 1</a>
Or, if you only want it to go somewhere when javascript is disabled, you can do both, add the return false and make the # a URL:
<a href="some.htm" onclick="return false;" onmouseover="doTooltip(event,4)" onmouseout="hideTip()">Link 1</a>
Finally, if you absolutely, positively don't want it going anywhere under any circumstances, do this:
<a href="javascript:void(0);" onclick="return false;" onmouseover="doTooltip(event,4)" onmouseout="hideTip()">Link 1</a>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.