add event handler, without remove the old one

say 'el' is a html element, already get by some way, and it has a event 'onclick'.
el may already have onclick handler
i want to add an other event handler, and it must be invoked after the old one.
i tried attachEvent(), but it invoke the new handler first
[299 byte] By [CoDavid] at [2007-11-20 5:25:16]
# 1 Re: add event handler, without remove the old one
i want to add an other event handler, and it must be invoked after the old one.
I don't think you can do this with JavaScript. Any event added to an object comes first in the pecking order. At least, that is what I have dealt with for years. You can set a timeout to fire after a few seconds, but then you would have to judge how long the other event takes. That will be different on every computer.
PeejAvery at 2007-11-8 0:41:52 >
# 2 Re: add event handler, without remove the old one
well, i've got to change my code then...thx
CoDavid at 2007-11-8 0:42:50 >
# 3 Re: add event handler, without remove the old one
Good luck! :thumb:
PeejAvery at 2007-11-8 0:43:54 >