Hi,

> >> $(this).change(myfunction);
> >
> > To expand on that a small bit: if you want to call a method of an
> > object then you must create an anonymous function to do it for you:
> >
> > $(this).change( function(){ myobject.myFunc() } );
>
> I was of the impression that
>
> $(this).change(myObject.myFunc);
>
> would work...

No, that would only give the function object myObject.myFunc to change(), 
which has no relation to myObject. The "this" variable is set at the time a 
function is called. That means, that when change() whants to call 
myObject.myFunc the propper object for "this" is not available.

Christof

Reply via email to