![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archive.addEventListener() not finding the right object method
From: Liming <lmxudotnet@gmail.com>
Date: Fri Aug 26 2005 - 16:37:07 CEST
Hello all,
I have a custom class object with some prototype methods like
The problem is on my webpage, after I instantiate the class, I try to
----------------
var myownobject ;
window.onload = init;
function init()
function initListener()
myobj.getTextarea().addEventListener("keydown",myobj.setKeyDownEvent,true);
myobj.getTextarea().addEventListener("keyup",myobj.setKeyUpEvent,true);
myobj.getTextarea().addEventListener("keypress",myobj.setKeyDownEvent,false);
myobj.getTextarea().addEventListener("keyup",webcmd.setKeyUpEvent,false);
} else {
myobj.getTextarea().attachEvent('onkeydown',myobj.setKeyDownEvent,false);
myobj.getTextarea().attachEvent('onkeyup',myobj.setKeyUpEvent,false);
MyObject is a custom class I have and the problem is inside its
Myobject.prototype =
so when a say key event is pressed, firefox say this.mehtod2() is not a
<script ...>
so I'm thinking, this's try to find "this" inside window object instead
|