I'm trying to do the following:
function row() {
this.selected = false;
this._el = document.create Element("TR");
this._el.attach Event("onClick" , this.rowClick);
}
row.prototype.r owClick = function() {
this.selected = true;
}
var r = new row();
The rowClick event doesn't work however, because "this" doesn't point
to the row object in the rowClick function. How do I get "this" to
point to the row object?
function row() {
this.selected = false;
this._el = document.create Element("TR");
this._el.attach Event("onClick" , this.rowClick);
}
row.prototype.r owClick = function() {
this.selected = true;
}
var r = new row();
The rowClick event doesn't work however, because "this" doesn't point
to the row object in the rowClick function. How do I get "this" to
point to the row object?
Comment