On 4/10/06, Erin Brewer <[EMAIL PROTECTED]> wrote: > I like the technique you describe here, but when i try to reference > 'theElement' in NamedActionResponseHandler() it is not defined. > > I changed the onComplete def to: > onComplete: NamedActionResponseHandler.bind(this, theElement) > > And changed the function to > function NamedActionResponseHandler(theResponse, theElement) > > In the function I get 'theResponse' as the returned xml still, but > 'theElement' is undefined, am i missing something?
swap theElement and theResponse in your function NamedActionResponseHandler definition. Your optionally bind()'ed parameters are passed first. Gregory, bind() does support this. It's my preferred technique. Todd _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs