[Seaside] Re: Someone explain please the following syntax that appear as illustration of jQuery

Tony Fleig tony.fleig at gmail.com
Wed Dec 22 04:59:15 UTC 2010


Yes, I think that the argument to the block is an empty Script object
that you can append to and that is then the result of the block's
execution.

I think, but I am not certain, that you can even append raw Javascript
like this:

   [ :s | s << 'alert("Hello World");' ]

but you should test it because I'm not sure of this.

What wasn't obvious to me (although maybe it should have been) was
that this requires an ajax call to the server even if the Javascript
is static and doesn't really require any information from the server
(like my alert example above.)

To avoid the ajax callback to the server I think you use syntax like:

   onClick: ( 'alert("Hello World");')

Again, I'm new to this also and you should test everything I say
before  accepting it. Maybe someone more knowledgable can point out
any flaws in my reasoning for us newbies.

The sections on this in the Seaside book are essentially unfinished
now, leaving us to speculate how it might work from whatever examples
we can find or by reading the code -- which in most cases is
comment-free.

Regards,
TF


Regards,
TF


On Tue, Dec 21, 2010 at 8:03 PM, Fritz Schenk <intrader at aol.com> wrote:
> Most helpful Tony
> Ah!.
> Thanks for the use of 'Tools/Message Names. I was searching for the method and
> could not find it.
>
> So are they returning 's' from the ajax callback with the its contents carrying
> the new contents?
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list