C
Charles Eubanks
The enclosed html snippet displays an area map. The behavior I want
is for each area to show up (eg show the outline of the poly) when the
user mouses over it. This happens nicely BUT in order for this to
occur, the user must hit the tab key to set the focus into the image
(or the map -- I am not sure which at this point).
In any case, I need a way to automatically force the browser focus
into the image (or map) -- because end-users do not understand about
using the tab key to move browser focus when there is no obvious form
in front of them.
So far I have tried several different permutations using focus() and
setActive() and had no success.
And lastly, yes, an IE-specific solution is just-fine-thank-you.
Thanks in advance for your help
---------------------------code begins-------------------------
<html>
<body>
<img src="combo1.png"
onMouseOver="document.getElementById('mymap').setActive()"
usemap="#mymap"/>
<map name="mymap" id="mymap">
<area alt="1" title="1" shape="poly" coords="60,15,90,15,90,35,60,35"
tabindex="1"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
href="#" target="_self" />
<area id="area1" alt="2" title="2" shape="poly" tabindex="2"
coords="90,120,110,120,110,140,90,140" href="#" target="_self"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
onclick="javascript:alert(window.event.srcElement.tagName);window.event.srcElement.focus()"
/>
</map>
</body>
</html>
------------------------------code ends-------------------------
is for each area to show up (eg show the outline of the poly) when the
user mouses over it. This happens nicely BUT in order for this to
occur, the user must hit the tab key to set the focus into the image
(or the map -- I am not sure which at this point).
In any case, I need a way to automatically force the browser focus
into the image (or map) -- because end-users do not understand about
using the tab key to move browser focus when there is no obvious form
in front of them.
So far I have tried several different permutations using focus() and
setActive() and had no success.
And lastly, yes, an IE-specific solution is just-fine-thank-you.
Thanks in advance for your help
---------------------------code begins-------------------------
<html>
<body>
<img src="combo1.png"
onMouseOver="document.getElementById('mymap').setActive()"
usemap="#mymap"/>
<map name="mymap" id="mymap">
<area alt="1" title="1" shape="poly" coords="60,15,90,15,90,35,60,35"
tabindex="1"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
href="#" target="_self" />
<area id="area1" alt="2" title="2" shape="poly" tabindex="2"
coords="90,120,110,120,110,140,90,140" href="#" target="_self"
onMouseOver="this.focus();"
onMouseOut="this.blur();"
onclick="javascript:alert(window.event.srcElement.tagName);window.event.srcElement.focus()"
/>
</map>
</body>
</html>
------------------------------code ends-------------------------