Results 1 to 4 of 4
Jun 30, 2008, 05:58 #1
- Join Date
- Nov 2007
- 0 Post(s)
- 0 Thread(s)
attachEvent - this keyword problem
I know, i have been searchin the forums, and i did find some results on this subject, but i still don't know exactly how to work this out.
The problem is, that i'd like to use attachEvent, and inside event listener i'd use THIS keyword. BUt from what i get, i is refering to global object instead of object that function was called upon.
From what i understand, to corect this, i would need to somehow call this event listener function as a method/property of target element, but whatever i do, i can't achive this. So can somebody write a verry simple example how this would work the same way as in w3c browsers?