Imagemaps


Client-side imagemap processing is supported by most current web browsers. Older browsers require server-side processing, which adds slightly to the complexity of the task.

Client-side processing

The information needed to interpret the imagemap data is contained in a named Map Reference Element, generally in the same HTM file which calls up the imagemap. In the example you have just used to get here, the name "example" is used to identify the Map Reference Element.

The Map Reference Element

<map name="example">
<area shape="poly" coords="22,42,38,29,76,20,92,20,103,26,101,34,94,42,
75,51,54,57,37,58,26,56,22,52,19,49" href="advance2.htm">
<area shape="default" nohref>
</map>

The element, coords="22,...,49", indicates the co-ordinates, measured in pixels, of the appropriate area of the image. This sensitive area in this example is a polygon surrounding the hotspot. The polygon is a hyperlink to this file, advance2.htm.

If you use View/Source on the previous file, you will find these lines at the end of the file, just before the </BODY> tag.

The Usemap Attribute

A client-side imagemap is activated by a USEMAP attribute within the the Image Source command: <IMG BORDER=0 HEIGHT=107 WIDTH=198 SRC="graphics/imagemap.gif" ALT="Simple Imagemap" USEMAP="#example">

Server-side processing

The file needed to process the imagemap data has to exist on the server and is accessed by a URL link to the name of the file, along with an ISMAP instruction.

Return to Previous Page


http://www.nmacmillan.com/advance2.htm
Updated: Sep 15 2015

W3C 4.0 Checked!