On 5/1/06, Bob Ippolito <[EMAIL PROTECTED]> wrote:
>
>
> On May 1, 2006, at 5:17 AM, Uwe Voelker wrote:
>
> >
> > Hello,
> >
> > I'm currently using Prototype (mainly for Ajax things) and I would
> > like
> > to give MochiKit a try.
> >
> > My question: Is there an equivalent for Ajax.Updater?
> >
> > (Ajax.Updater let's you specify an ID, URL and request data and it
> > updates the div with id ID with the HTML from the response.)
>
> Not in the release version, but here's how you'd write it:
>
> updateElementFromHTML = function (id, url) {
> var d = doSimpleXMLHttpRequest(url);
> d.addCallback(function (req) {
> getElement(id).innerHTML = req.responseText;
> });
> d.addErrback(logError);
> return d;
> };
>
> -bob
Thanks for that snippet, Bob (and for the question, Uwe), I think I
may have a use for that exact bit of code in a demo I'm doing at work.
Good timing.
--Dethe
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" 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/mochikit
-~----------~----~----~----~------~----~------~--~---