Currently, I have an image with a image map. Is there a way for me to write some JavaScript code that will use the area name as a variable to display what is actually on it? All the text and area names are inside a data array already.
For example, if this area is named Area1, it'll have the text Text1 inside, and etc.
Why would I want to do this? It's easier for me to print it out with the names on it.
Edit: Example of image map
<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>