On May 1, 2006, at 12:45 PM, Uwe Voelker wrote:

> Hello Bob,
>
>> 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;
>> };
>
> Thanks.
>
> After I included serveral MochiKit files it works :-)

For that you'd need Base, Async, Iter, Logging, DOM in about that  
order.. or you can use just MochiKit.js (many people use packed/ 
MochiKit/MochiKit.js).

To cut out the Iter, DOM, and Logging dependencies you can replace  
getElement(id) with document.getElementById(id) and remove the error  
handling (logError).

-bob


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to