[thelist] NS6 : how locate event trigger element?

Mark Cheng mark.cheng at ranger.com.au
Fri Apr 27 02:20:15 CDT 2001


http://members.evolt.org/MarkC/linkevent.htm

Don't ask me why, but I am trying to use JS and DOM to put the title
associated with each <a> link into the status bar when you mouseover the
link.   I wrote a function to attach onmouseover events to all links.  Then,
when the user mouseovers the link, I pull the link object, get it's title
and write that to the status bar.

The above page works fine in ie5 up because window.event.srcElement returns
the appropriate A object.

It doesn't work in NS6 because event.target is returning the text object
within the A element (ie the visible link).  I need to get to the
parentnode, but event.target.parentnode doesn't include all of the A
attributes.  event.currentTarget has the same problem as
event.target.parentnode.

So, is there any way to select the relevant <a> parent,
i)without having to loop through all <a> tags to find one with the
appropriate child? and
ii) without having to name all the links individually?

TIA

Mark Cheng
Financial Controller
Ranger Minerals Ltd
Phone 08 9364 8355


This email may be confidential and contain commercially sensitive information.  Only the intended recipient may access or use it.  If you are not the intended recipient please delete this email and notify us promptly. 
We use virus scanning software but exclude all liability for viruses or similar in this email or any attachment.






More information about the thelist mailing list