Google Answers Logo
View Question
 
Q: Creating tooltips in an image map using Dreamweaver 8 ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Creating tooltips in an image map using Dreamweaver 8
Category: Computers > Software
Asked by: robbycoats1-ga
List Price: $60.00
Posted: 15 Oct 2006 16:31 PDT
Expires: 14 Nov 2006 15:31 PST
Question ID: 773826
I need to know how to create an image map, but instead of the
different areas of the image linking to different pages, I need them
to cause different tooltips to appear (preferably next to the mouse
pointer), so as to offer descriptions of different parts of the image.
 I would like the appearance of the tooltips to be immediate on
mouseover.  It would be nice, but not necessary, to also have the
tooltips "follow" the mouse pointer around until the pointer leaves
the area outlined in the image map (I know I've seen this somewhere
before).  The tooltips also need to be able to accommodate a good deal
of text, up to a paragraph.

You may assume that I know a fair amount of HTML, but nothing about
Java script.  If possible, however, I would like to accomplish this
solely with Dreamweaver, and without code.
Answer  
Subject: Re: Creating tooltips in an image map using Dreamweaver 8
Answered By: answerguru-ga on 15 Oct 2006 17:56 PDT
Rated:5 out of 5 stars
 
Hi robbycoats1-ga,

I had to look this one up, but I was able to find the answer to your
question in the W3C definition of the MAP element:

http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#edef-AREA

Here is a sample of how to use it to achieve what you described:

<IMG SRC="myimage.gif" usemap="#map1">

<MAP name="map1">
 <AREA alt="Place descriptive text here for this rectangular area."
          shape="rect" 
          coords="0,0,0,0">
 <AREA alt="Place descriptive text here for another rectangular area."
          shape="rect" 
          coords="100,0,200,100">
 <AREA alt="Place descriptive text here for a circular area."
          shape="circle"
          coords="160,160,60">
 <AREA alt="Place descriptive text here for a polygon."
          shape="poly" 
          coords="276,0,276,28,100,200,50,50,276,0">
</MAP>

Note that, unlike the W3C example, I have removed the HREF attributes
from all of the map areas. This means that the areas do not have any
links to other pages.

Essentially, what is required to accomplish tooltip display that
varies on different areas of an image map is the use of the ALT
attribute for each area in the map.

A tooltip that "follows" the mouse while it's moving is a good deal
more complex, and cannot be achieve without some rather complicated
code. This code will display a normal tooltip, where the mouse is
placed on an area of the image and left there (for 1-2 seconds).
Moving the mouse again will hide the tooltip again until it is once
again positioned over an area with ALT text defined.

I tried out the solution above with a fairly large piece of text and
it was able to display it without any problem. A paragraph-size piece
of text will display without a problem.

Hopefully that should answer your question - if you require any
clarification please let me know. I will attempt to respond promptly.

Thank you for using Google Answers :)

Cheers!

answerguru-ga
robbycoats1-ga rated this answer:5 out of 5 stars
Very concise, excelent.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy