DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Use Ismap To Specify A Server-side Image Map

06.04.2010
| 3412 views |
  • submit to reddit
        Source: <a href="http://help.dottoro.com/lhnmofht.php">ISMAP attribute (img) HTML & XHTML</a> [dottoro.com]

<snip>
Sets a Boolean value that indicates whether an img is a server-side or client-side image map.

With this attribute you can submit the coordinates of a user click on an img to a server.

Place the img element in an anchor tag and set the href attribute of the anchor tag to the URL of the server. In that case, if the img is a server-side image map, when the user clicks on the image, the URL specified by the href attribute will be called with the coordinates of the mouse click. The coordinates are relative to the top-left corner of the image.

The coordinates are appended to the end of the URL in the following form: URL?x,y, where x and y are the coordinates of the click.
<a href="#">
    <img src="picture.gif" ismap="ismap" />
</a>
<snip>