About IE, the event handlers, and 'this'
Another beautiful evening I spent with IE.
Normally I use addEventListener/attachEvent (congratulations again, IE) to handle events, and normally I love it, and feel this is the way things should work. One day I ran into a problem, when in the event handler I needed a reference to the object I defined the event on. Consider this:
<div class="sokilyenvan" id="joskabacsi">
<img alt="" src="blah.gif" />
nyehehe
<span id="pistabacsi">gihi</span>
</div>
So, I attach an 'onclick' event to all the elements which are of the class 'sokilyenvan'. In the event handler, I need to know which specific one was clicked (for example 'joskabacsi').