[Seaside] callback registry

Lukas Renggli renggli at gmail.com
Wed Oct 29 08:22:17 UTC 2008


You need to add the code to the load script (#addLoadScript:),
otherwise the DOM is not ready yet.

Cheers,
Lukas

On Wed, Oct 29, 2008 at 8:57 AM, Marco D'Ambros
<marco.dambros at lu.unisi.ch> wrote:
> Hi,
>
> I tried to insert the script in a seaside application, in the #updateRoot:
> method like this:
>
> updateRoot: root
>        super updateRoot: root.
>        root javascript resourceUrl:
> 'http://www.prototypejs.org/assets/2008/9/29/prototype-1.6.0.3.js'.
>        root javascript add: '$(document.body).observe("click", function
> (event) {
>   var element = Event.element(event);
>   var extractor = /]*>((.|\s)*)<\/body>/;
>   if (!element.href) element = element.up("a");
>   if (element.href) {
>       new Ajax.Request(element.href, {
>           method: "get",
>           requestHeaders: [ "X-Requested-With", "" ],
>           onSuccess: function (transport) {
>               document.body.innerHTML =
>                  extractor.exec(transport.responseText)[1];
>           }
>        });
>        Event.stop(event);
>   }
> }.bindAsEventListener());'
>
>
> but it seems that I did not succeed.
> Am I doing something wrong?
>
> Cheers and thanks
> Marco
>
>
> On Oct 24, 2008, at 8:42 PM, Lukas Renggli wrote:
>
>>> thanks for the reply. Could you please tell me a bit more about the
>>> details,
>>> especially on the client-side javascript?
>>
>> http://www.lukas-renggli.ch/blog/ajaxification
>>
>> Cheers,
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list