Simple subclassing should do the job (haven't tested but it should
work):
Ajax.Replacer = Class.create(Ajax.Updater, {
initialize: function($super, container, url, options) {
options = options || { };
options.onComplete = (options.onComplete ||
Prototype.emptyFunction)
.wrap(function(proceed, transport, json) {
$(container).replace(transport.responseText);
proceed(transport, json);
})
$super(container, url, options);
}
})
new Ajax.Replacer("someElement", "someUrl");
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" 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/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---