[Seaside] How to update XHTML with jQuery

Lukas Renggli renggli at gmail.com
Sun Nov 29 09:58:58 UTC 2009

>>  onChange: (((html jQuery: #items) load
>>                         serialize: (html jQuery this parents; find: 'form'))
>>                         html: [:ajaxHtml | self renderItemsOn: ajaxHtml]);
> It works thank you. By manipulating your query, I was able to write
> the following which still works and seems easier to read:
> onChange: ((html jQuery: #items) load
>                                serializeForm;
>                                html: [:ajaxHtml | self renderItemsOn: ajaxHtml]);

#serializeForm does serialize the closest form that surrounds the
current node (the element you set the #onChange:).

The code of Gerhard serializes all forms on the page, by enumerating
over all children of all parents of the current node. This is likely
very inefficient and could be replaced by

    html jQuery: 'form'

which should yield the same result.


Lukas Renggli

More information about the seaside mailing list