Hello All,
I'm new to javascript and scriptaculous so I wanted to ask gurus about
CORRECT way of extending already existing methods. Here is my example:
we have:
Autocompleter.updateElement() {
...
if (this.options.afterUpdateElement)
this.options.afterUpdateElement(this.element, selectedElement);
}
Let's say I want to "submit form" right after user select new value in
Autocompleter field. What the CORRECT way to accomplish that? I need
to make something similar to:
function newAfterUpdateElement() {
.... <do my actions here>...
return this.oldAfterUpdateElement();
}
Autocompleter.prototype.options.oldAfterUpdateElement=Autocompleter.prototype.options.afterUpdateElement;
Autocompleter.prototype.options.afterUpdateElement=newAfterUpdateElement;
thanks,
bigral
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---