Re: Is it possible to use onClick with an Image in Mozilla?
- From: j_liu21@xxxxxxxxxxx
- Date: 23 Jul 2005 19:43:04 -0700
Actually it seems it does work if I remove the usemap feature.
<a href="javascript:void(0)" onClick="alert('hi');"><IMG src="foo.gif"
border="0"></a>
The problem is I need to use the imagemap to determine where they
click, but because the imagemap is reused multiple times, I don't have
the context of which image the user actually clicked.
<a href="javascript:void(0)" onClick="alert('hi');"><IMG src="foo1.gif"
name="foo1" usemap="#someImageMap" border="0"></a>
<a href="javascript:void(0)" onClick="alert('hi');"><IMG src="foo2.gif"
name="foo2" usemap="#someImageMap" border="0"></a>
Is there any way to capture this context in the map itself where I can
retrieve the name?
<map name="someImageMap">
<area shape="rect" coords="0,0,15,16" onClick="inputValue(1,this)"
ALT="Section 1">
<area shape="rect" coords="16,0,33,16" onClick="inputValue(2,this)"
ALT="Section 2">
</map>
.
- Follow-Ups:
- References:
- Is it possible to use onClick with an Image in Mozilla?
- From: j_liu21
- Is it possible to use onClick with an Image in Mozilla?
- Prev by Date: Is it possible to use onClick with an Image in Mozilla?
- Next by Date: Re: Associating keys to a function
- Previous by thread: Is it possible to use onClick with an Image in Mozilla?
- Next by thread: Re: Is it possible to use onClick with an Image in Mozilla?
- Index(es):