how to catch a XmlHttpRequest to evaluate a callback

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to catch a XmlHttpRequest to evaluate a callback

Burella Juan M.
Hello all.
If I´d want to port a javascript library, say SmartClient, YUI, Dojo, etc. (not Prototype compatible), how would I catch the XmlHttpRequest and evaluate a block with a canvas as argument and reply to the client what has been "rendered" inside that block? (I suppose this is what Scriptaculous does through callbacks but I cannot find where and how).
Cheers

Juan Matías.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: how to catch a XmlHttpRequest to evaluate a callback

Lukas Renggli
> If I´d want to port a javascript library, say SmartClient, YUI, Dojo, etc.
> (not Prototype compatible), how would I catch the XmlHttpRequest and
> evaluate a block with a canvas as argument and reply to the client what has
> been "rendered" inside that block? (I suppose this is what Scriptaculous
> does through callbacks but I cannot find where and how).

Have a look at SUAjax, this is where all magic is happening. The
interesting methods are #setCanvas: and #process. The first method
creates an URL with the assigned rendering callback #process. Also
interesting is #callback:value: that modifies the URL to include
additional callbacks to pass back values from Javascript to Smalltalk
world.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside