Reference: *Server-side Image Map Module at the W3C
The Server-side Image Map Module declares only attributes.
The Server-side Image Map Module declares additional attributes on elements in other Modules.
| Attribute(s) | Element(s) |
|---|---|
ismap | img, input type="image" |
The Server-side Image Map Module is used to create an image map
within a document where a server-side handler performs a different action for different
pixel coordinates clicked (activated) within an image. The user agent sends these coordinates
to the handler for processing. This is in contrast to a client-side image map
(see the Client-side Image Map Module)
where the user agent itself processes the coordinates and determines which
link to follow based upon information detailed within an associated
map element.
Note: Non-graphical user agents (which do not allow the user to select
specific coordinates) should send the coordinates 0,0 to the server
(and it is wise to assume that some may omit them altogether) so any handler should include suitable fallback
functionality for these cases.
A server-side image map can be created using either an
img
element or an
input type="image"
element.
img ElementIf using an img
element, it should be given the attribute
ismap="ismap"
and be enclosed within an
a element.
In a graphical user agent, the pixel coordinates are appended to the URI specifed in the
href attribute of the
a element as the query string
?xpos,ypos (e.g. ?121,36). Here xpos is the x pixel
coordinate (from the left of the image) and ypos is the y pixel coordinate
(from the top of the image).
input type="image" ElementIn a graphical browser, if a user clicks (activates) an
input type="image"
element (which acts as a graphical submit button for a
form) the parameters
imgname.x=xpos and imgname.y=ypos
should be sent by the user agent to the processing server along
with the rest of the form data. Here, imgname is the value of the
name attribute of the
input type="image" element
and, as above, xpos is the x pixel coordinate (from the left of the image) and
ypos is the y pixel coordinate (from the top of the image):
e.g. pos.x=43 and pos.y=106
for name="pos".
These coordinate parameters are included whether or not the
ismap attribute
is specified (at least in all user agents I've used). In fact, the
ismap attribute
is not valid on the input type="image"
element for XHTML 1.0 code, so if compatibility is desired
between XHTML 1.1 and XHTML 1.0, I can only conclude that it should
be omitted entirely.