[thelist] Dereferencing in Javascript

Christian Heilmann codepo8 at gmail.com
Wed Sep 27 08:58:52 CDT 2006

> Thanks a lot. I understand the scope issue now. What do you mean exactly by
> using an addEvent handler?


DOM-1 onclick handlers mean that nothing else can access that element
for other functionality without overriding what you have done. By
using an addEvent wrapper you can add more and more functionality to
the same element without interfering with others.

If you showed a whole URL of your solution, I'd be able to give a
solution using a library that'll save you a lot of time and trouble.
For example jQuery
(http://beginningjavascript.com/Chapter11/exampleJQuery.html) or YUI

Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/

More information about the thelist mailing list