<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="Georgia">just lurking, but perhaps this is what you
      need:<br>
      <br>
    </font><br>
    <div class="moz-cite-prefix">On 12/18/13 7:07 PM, Johan Brichau
      wrote:<br>
    </div>
    <pre wrap="">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


</pre>
    <div class="moz-cite-prefix">On 3/3/14 10:38 AM, Esteban A.
      Maringolo wrote:<br>
    </div>
    <blockquote
cite="mid:CAJMgPCLm94jmiFWMYt7X_ctegsEbBOWq6fCqQEbN2tHE8233cQ@mail.gmail.com"
      type="cite">
      <pre wrap="">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 <span class="moz-smiley-s1" title=":)"><span>:)</span></span> )

</pre>
    </blockquote>
    <br>
  </body>
</html>