[Seaside] Javascript calls through jQuery

jtuchel at objektfabrik.de jtuchel at objektfabrik.de
Tue Mar 4 07:34:45 UTC 2014


wow, there is something new to learn about Seaside and JS/jQuery every 
day. Thanks for digging this out, I wasn't aware of the fact that you 
can define js functions and make them callable for the js side in Seaside...



Am 03.03.14 16:55, schrieb Bob Arning:
> just lurking, but perhaps this is what you need:
>
>
> On 12/18/13 7:07 PM, Johan Brichau wrote:
> The Javascript wrappers in Seaside (JSObject subclasses) provide a number of convenience methods to achieve this.
> For example:
>
> html script: ((html jQuery ajax callback:[ ]) asFunction assignTo: 'myfunction').
>
> Then just call myfunction() from your javascripts.
>
> cheers
> Johan
>
>
> On 3/3/14 10:38 AM, Esteban A. Maringolo wrote:
>> The trick is in the naming of the function (and it's recurrent call
>> from within) and the #create decoration which followed by a #call: is
>> a way to implement "immediately invoked function expression" in JS
>> (IIFE for short).
>>
>> I still have to learn how all the JavaScript/jQuery wrappers work, but
>> so far it's impressive how much you can do writing a few lines of
>> Smalltalk.
>>
>> If there is a way of doing this without having to modify JSFunction
>> I'll be happy to use. Otherwise see attached changeset (and integrate
>> if necessary:)  )
>>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20140304/8b1b97fd/attachment-0001.htm


More information about the seaside mailing list