kojilab wrote:
Hi
I have an object with a method I call run that iterates over some form
elements.
I want to be able to execute a method of that object on each element.
But when I use this in the function within the each() statement,
obviously the this doesn't correspond to the object
Hi Ken and Jon
Thanks for the info. Since I am not super familiar with the object
model in prototype, what would be the full code to call this
doSomething method within the each() function
Thanks again
On Feb 12, 12:28 pm, Ken Snyder [EMAIL PROTECTED] wrote:
kojilab wrote:
Hi
I have an
For further info: http://prototypejs.org/api/function/bind
- Jon L.
On Feb 12, 2:24 pm, Jon L. [EMAIL PROTECTED] wrote:
You can use the bind method.
this.formElements.each(function (el, index) { ... }.bind(this));
- Jon L.
On Feb 12, 2:05 pm, kojilab [EMAIL PROTECTED] wrote:
Hi