Search code examples
dictionaryarea

Why won't this map with a poly area work in FF and IE?


I'm trying to map an image using shape="poly". It works in Chrome, but doesn't work in IE or FF, and I'm not really sure why. I've tried duplicating the first coordinates at the end, and not duplicating them. Here's the code:

<map name="passport1_map" id="passport1_map">
<area shape="poly" coords="781,512,781,558,734,558,781,512"  href="javascript:toggle_popup('passport2_div')"/>
</map>
<img src="../../css/challenges/sevenWonders/passportEmptyPage1.png" Usemap="passport1_map"  width="800" height="567" />

Solution

  • Beacuse you're linking to a map in the same document, you need an anchor: usemap="#passport1_map"

    (Actually I don't think browsers support external maps any more.)