|
Sounds like a good idea, although I think this could be handled by the
programmer quite easily. For example, override the insertion function with one that checks a counter before calling Element.update manually: function doUpdate(what){ if(!element.updateCounter){ element.updateCounter = 0; } element.updateCounter++; new Ajax.Updater(element,'page',{ parameters: 'getData='+what, insertion: function(element,update){ element.updateCounter--; if(element.updateCounter == 0){ Element.update(element,update); } } }); } Note, this wouldn't prevent evalScripts from happening if it was enabled, or onComplete, etc.. from being called, so that would be a benefit to the patch if it handles these cases correctly. Agreed, we gotta see the code!Seeing some code would have been nice. :( I'm not so sure.. Say your insertion is something besides Element.update. If it is Insertion.Bottom then you may not want any insertions overridden. Rather than having Prototype test which insertion you're using, the override parameter may be a simpler and cleaner solution. Let the programmer decide!IMHO, there's no need for such an "override" parameter. Better yet, simply twist Ajax.Updater to behave like this. See http://prototypejs.org/contribute for info on submitting a patch. Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
- [Rails-spinoffs] Prototype, Ajax.Updater - stacking reque... Jimbo
- [Rails-spinoffs] Re: Prototype, Ajax.Updater - stack... Marius Feraru
- [Rails-spinoffs] Re: Prototype, Ajax.Updater - s... Colin Mollenhour
