IMG
tag is given the ISMAP
attribute,
and put inside a link to a server-side script, usually the imagemap
script. Example:
<A HREF="/cgi-bin/imagemap/2L690/images/demoimage.cf"> <IMG SRC=/2L690/images/demoimage.gif ISMAP></A>
imagemap
consults a map file,
containing the region-destination pairs:
default /.../none.html circle /.../circle.html 196,99 224,99 rect /.../rect.html 277,72 258,126 poly /.../poly.html 222,207 250,180 277,207 264,234 236,234
The imagemap
program receives the coordinates of the mouse click
as a parameter. Other server-side scripts can be used that interpret these
coordinates in a completely different way.
ISMAP
a USEMAP
attribute is used,
indicating the URL of the file with the map (it may be part of the same file
containing the IMG
tag.
A separate link (A
) tag is no longer used.
<IMG SRC="/2L690/images/demoimage.gif" USEMAP="#map">
MAP
tag:
<MAP NAME="map"> <AREA HREF="circle.html" ALT="Inside the circle" SHAPE="circle" COORDS="30,31,28"> <AREA HREF="rect.html" ALT="Inside the rectangle" SHAPE="rect" COORDS="111,4,192,58"> <AREA HREF="poly.html" ALT="Inside the polygon" SHAPE="poly" COORDS="56,139,84,112,111,139,98,166,70,166> <AREA HREF="none.html" ALT="Outside the objects" SHAPE="default"> </MAP>The "default" area must be the last one.