Results 1 to 5 of 5

Thread: Image w/ tooltip

  1. #1
    Join Date
    Oct 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Image w/ tooltip

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    <a href="whatever.htm">Link Text or img tag</a>
    You can stop it from firing by:

    Code:
    <a href="whatever.htm" onclick="return false;">Link Text or img tag</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    John is right, btw he was referring to this one:
    http://www.dynamicdrive.com/dynamici...agetooltip.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:
    Code:
    <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.
    Jeremy | jfein.net

  4. #4
    Join Date
    Oct 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default The Correct Link

    Heres the right link, sorry about that.

    http://www.dynamicdrive.com/dynamici...agetooltip.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

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by JayGeePee View Post
    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:

    Code:
    <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:

    Code:
    <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:

    Code:
    <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:

    Code:
    <a href="javascript:void(0);" onclick="return false;" onmouseover="doTooltip(event,4)" onmouseout="hideTip()">Link 1</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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