Using ISMAP to create and implement clickable image maps


The ISMAP directive is used in conjunction with the <IMG SRC...> tag. The syntax is as follows.

<IMG SRC="url" ISMAP>

Imagemaps are a specific implementation of a Common Gateway Interface using a program, imagemap, which takes as input an X,Y pixel coordinate and returns an associated URL. The pixel coordinate to URL mapping is accomplished by referencing a map file.

Here is an example of an imagemap.

The HTML source for this example on most servers looks like this:

<A HREF="/cgi-bin/imagemap.cgi/Services/WWW/HTML/Advanced/imagemap_example.map"><IMG SRC="imagemap_example.gif" ISMAP></A>

On this server, which has built in imagemap capability, it looks like this:

<A HREF="imagemap_example.map"><IMG SRC="imagemap_example.gif" ISMAP></A>

Notice that when the mouse is located above the image, the URL shown at the bottom of the browser shows the pixel coordinates that will be sent.


[ISINDEX] [Outline] [Mid-Session Quiz ]