Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #15493
| Message-ID | <6019389.DZK1vPGy3s@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2012-08-22 10:48 +0200 |
| Subject | Re: Getting event from map click |
| Newsgroups | comp.lang.javascript |
| References | <t86dnbfJxtcl9KnNnZ2dnUVZ_g2dnZ2d@westnet.com.au> <ff6dnd_ZZf8A8anNnZ2dnUVZ_jednZ2d@westnet.com.au> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Andrew Poulos wrote:
> On 22/08/2012 3:10 PM, Andrew Poulos wrote:
>> I have some js like this
>>
>> var myFunction = function(e, elem) {
>> e = e || window.event;
>> // do other stuff
>> };
>>
>> and some HTML like this
>>
>> <img id='tmp' src="lake.jpg" style="width:256px; height:192px;"
>> usemap="#pnt">
>> <map name="pnt">
>> <area shape="rect" coords="111,36,151,85" href="#"
>> onclick="myFunction(e, 'tmp'); return false;">
>> </map>
>>
>> I need the 'area' to pass the event to the function and some other
>> parameters. When I try the above I get e is undefined. How do I get it
>> to pass the event as well?
>
> Doh, I solved it.
Care to tell how?¹
PointedEars
___________
¹ There's a "stupid" question for you for a change.
--
When all you know is jQuery, every problem looks $(olvable).
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Getting event from map click Andrew Poulos <ap_prog@hotmail.com> - 2012-08-22 15:10 +1000
Re: Getting event from map click Andrew Poulos <ap_prog@hotmail.com> - 2012-08-22 15:22 +1000
Re: Getting event from map click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-22 10:48 +0200
Re: Getting event from map click Andrew Poulos <ap_prog@hotmail.com> - 2012-08-22 22:16 +1000
Re: Getting event from map click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-22 16:23 +0200
Re: Getting event from map click Andrew Poulos <ap_prog@hotmail.com> - 2012-08-23 18:08 +1000
Re: Getting event from map click Andrew Poulos <ap_prog@hotmail.com> - 2012-08-24 07:25 +1000
Re: Getting event from map click SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-22 18:09 +0200
Re: Getting event from map click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-22 10:46 +0200
csiph-web