HTML and CSS Reference
In-Depth Information
6.5.6. Handling Other Browsers
Unlike its server-side ismap counterpart, the client-side image-map tag
with attributes ( <img usemap> ) doesn't need to be included in an <a> tag.
But it may be so that you can gracefully handle browsers that are un-
able to process client-side image maps.
For example, the ancient Mosaic and early versions of Netscape simply
load a document named main.html if the user clicks the map.gif image
referenced in the following source fragment. More recent browsers,
on the other hand, divide the image into mouse-sensitive regions, as
defined in the associated <map> , and link to a particular name anchor
within the same main.html document if the user selects the image-map
region:
<a href="main.html">
<img src="pics/map.gif" ismap usemap="#map1">
</a>
...
<map name="map1">
<area coords="0,0,49,49" href="main.html#link1">
<area coords="50,0,99,49" href="main.html#link2">
<area coords="0,50,49,99" href="main.html#link3">
<area coords="50,50,99,99" href="main.html#link4">
</map>
To make an image map backward compatible with all image-map-cap-
able browsers, you may also include client-side and server-side process-
ing for the same image map. Capable browsers will honor the faster
client-side processing; all other browsers will ignore the usemap attribute
in the <img> tag and rely upon the referenced server process to handle
user selections in the traditional way. For example:
<a href="/cgi-bin/images/map.proc">
<img src="pics/map2.gif" usemap="#map2" ismap>
</a>
 
Search WWH ::




Custom Search