1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Mouse Over issue

Discussion in 'Web Design & Development' started by johnnyburst79, Oct 31, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. johnnyburst79

    johnnyburst79 Thread Starter

    Joined:
    Aug 16, 2005
    Messages:
    4,560
    I'm building a map and making each building on the map clickable and while that is done, I'm now putting in names to appear when the user mouses over.

    This is what I have thus far:

    <area shape="rect" coords="362,372,399,432" href="www.link.biz" target="_self" onMouseOver="Testing">Testing</a></p>

    Somethings missing but I'm not sure what....any advice?
     
  2. metweek

    metweek

    Joined:
    Jun 6, 2003
    Messages:
    125
    You need to create an event handler in javascript.

    Code:
    <script type="text/javascript">
    function Testing(label)
    {
       document.write(label);
    }
    </script>
    
    Your link should also pass a parameter which in this case would be the text you want to display for the current object the mouse is over.
    Code:
    onmouseover="testing('label');"
    
    You probably would want to add a handler for when the mouse is moved off of the object, which will set the label back to nothing.
    Code:
    onmouseover="testing('');"
    
     
  3. MMJ

    MMJ Guest

    Joined:
    Oct 15, 2006
    Messages:
    3,625
    If I understand you correctly you don't need to use JS for this. All you you need to do is add the title attribute.

    title="this will appear on mouseover"
     
  4. johnnyburst79

    johnnyburst79 Thread Starter

    Joined:
    Aug 16, 2005
    Messages:
    4,560
  5. MMJ

    MMJ Guest

    Joined:
    Oct 15, 2006
    Messages:
    3,625
    no problem. :)

    I guess you can mark this as solved.
     
  6. johnnyburst79

    johnnyburst79 Thread Starter

    Joined:
    Aug 16, 2005
    Messages:
    4,560
    I will. Also, I tried out the MouseOver command and with "title", it was unnecessary.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/646085

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice