[Seaside] Bug? calling javascript function from onComplete:

Lukas Renggli renggli at gmail.com
Tue Jul 22 12:56:33 UTC 2008


If you put a String there, it is serialized as a String as well. Use

    SUStresm on: 'alert("foo")'

to include as verbatim.

Cheers,
Lukas

On 7/22/08, Norbert Hartl <norbert at hartl.name> wrote:
> I need to chain some calls I do with Ajax. I found
> the onComplete:, onSuccess: etc. handlers. Every example
> I've found in the image uses them to invoke an html updater.
>
> Trying to do this
>
> ...
>    onClick: (
>       html updater
>          callback: [];
>          onComplete: 'alert("booo!");'
>    );
>    with: 'something'.
>
> leads to javascript code like
>
> new
> Ajax.Updater('layers','http://localhost:9090/seaside/svgex',{'insertion':Insertion.Bottom,'onSuccess':function(){'alert("boo!");'},'evalScripts':true,'parameters':['_s=EagyxUvvWRPxlAdD','_k=K3OXE7pw','4'].join('&')})
>
> The problem is that to javascript code is printed with surrounding
> ticks ' and therefor cannot be executed.
>
> Am I doing something wrong or should be work that way?
>
> thanks,
>
> Norbert
>
>
> _______________________________________________
> 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