I'm trying the following:
function grid() {
this._el = document.create Element("TABLE" );
var self = this;
document.addEve ntListener("onk eydown", function(event)
{self.gridKeyDo wn(event);}, false);
}
grid.prototype. gridKeyDown = function(event) {
//some code
}
var datagrid = new grid();
the addEventListene r doesn't get added, the gridKeyDown method never
gets executed. Can I add onkeydown to the document object? Is there a
good reference about mozilla dom?
function grid() {
this._el = document.create Element("TABLE" );
var self = this;
document.addEve ntListener("onk eydown", function(event)
{self.gridKeyDo wn(event);}, false);
}
grid.prototype. gridKeyDown = function(event) {
//some code
}
var datagrid = new grid();
the addEventListene r doesn't get added, the gridKeyDown method never
gets executed. Can I add onkeydown to the document object? Is there a
good reference about mozilla dom?
Comment