Just out of curiosity... how this is better than having a wrapper element and using Ajax.Updater instead?
To me, it seems like replacing : var str = "foo " + "bar"; with : var str = cat( "foo ", "bar" ); function cat(a, b) { return a + b; } Unless you really have to process your response in a specific way that Ajax.Updater doesn't do, it is, IMHO, that it adds duplicate code to the core. If I am mistaking, please help me see the light here. yanick On Apr 27, 4:51 pm, "I. E. Smith-Heisters" <[EMAIL PROTECTED]> wrote: > I saw in the archives that someone was looking for an Ajax.Replacer > class: > > http://groups.google.com/group/prototype-core/browse_frm/thread/a2fed... > > I found that the implementation suggested didn't work correctly with > 1.6.0.1, so I just wanted to share my new implementation: > > Ajax.Replacer = Class.create(Ajax.Updater, { > updateContent: function(responseText) { > var receiver = this.container[this.success() ? 'success' : > 'failure'], > options = this.options; > > if (!options.evalScripts) responseText = > responseText.stripScripts(); > if (receiver = $(receiver)) receiver.replace(responseText); > } > > }); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---