vatech1993
27 Dec 2006, 7:36 PM
I've currently created a javascript object that constructs a html object (tr). I'm wanting an event to fire off when a user clicks this object. This was pretty easy by just defining as shown below:
tr.onclick= function(){
//some business logic
}
The problem I'm having is that I want to be able to access information about the clicked HTML object as well as information within the javascript object that contains all this code. Within the above example if I use the "this" object, I have a reference to the clicked html object, but I can't get access to the instance of the javascript object. I've tried using the EventManager as follows:
YAHOO.ext.EventManager.on(tr.id, 'click', this.clickRow, this, true);
When I do this and I use the "this" object, I have access to the javascript object, but I can't access any information about the clicked html object.
Is there a way to access both?
tr.onclick= function(){
//some business logic
}
The problem I'm having is that I want to be able to access information about the clicked HTML object as well as information within the javascript object that contains all this code. Within the above example if I use the "this" object, I have a reference to the clicked html object, but I can't get access to the instance of the javascript object. I've tried using the EventManager as follows:
YAHOO.ext.EventManager.on(tr.id, 'click', this.clickRow, this, true);
When I do this and I use the "this" object, I have access to the javascript object, but I can't access any information about the clicked html object.
Is there a way to access both?