HTML and CSS Reference
In-Depth Information
6.5.1.1. Server-side considerations
With mouse-sensitive, ismap -enabled image maps, the browser is re-
quired to pass along only the URL and mouse coordinates to the server.
The server converts the coordinates into a specific document. The con-
version process differs among servers and is not defined by the HTML or
XHTML standard.
You need to consult with your web server administrators and perhaps
even read your server's documentation to determine how to create and
program a server-side image map. Most servers come with some soft-
ware utility, typically located in a cgi-bin/imagemap directory, to handle
image maps. And most of these use a text file containing the image-
map regions and related hyperlinks that is referenced by your image-
map URL to process the image-map query.
Here's an example image-map file describing the sensitive regions in our
example image:
# Imagemap file=toolbar.map
default dflt.html
circ 100,30,50 link1.html
rect 180,120,290,500 link2.html
poly 80,80,90,72,160,90 link3.html
Each sensitive region of the image map is described by a geometric
shape and defining coordinates in pixels, such as the circle with its cen-
ter point and radius, the rectangle's upper-left and lower-right edge co-
ordinates, and the loci of a polygon. All coordinates are relative to the
upper-left corner of the image (0,0). Each shape has a related URL.
An image-map processing application typically tests each shape in the
order in which it appears in the image file and returns the document
specified by the corresponding URL to the browser if the user's mouse
X,Y coordinates fall within the boundaries of that shape. That means it's
OK to overlap shapes; just be aware which takes precedence. Also, the
 
Search WWH ::




Custom Search