srcElement in IE = what in Netscape?

Giganews Newsgroups
Subject: srcElement in IE = what in Netscape?
Posted by:  Dan (hgfgh…@dfgd.rf)
Date: Mon, 28 Jul 2003

Hi,

When i click down with the mouse, i want to be sure that the image "myimg"
is clicked before doing something. With IE i use 'srcElement' and it works:

<IMG ID="myimg"  SRC="bugs.gif" onMouseDown="downtest()">
<script>
function downtestIE()
{strid =window.event.srcElement.id
if (strid=="myimg")
{ etc ...

But how to do the same for Netscape? I tried with 'currentTarget' but get
always: 'e has no properties'
<script>
var e;
function downtest(e)
{strid=e.currentTarget
if (strid=="myimg")
{ etc ...

Any help is welcome
Dan

Replies