[Seaside] JQuery updating DOM elements

Lukas Renggli renggli at gmail.com
Tue Feb 10 20:18:48 UTC 2009


> html span class: 'formdata'; with: [html
> textInput
> id: #tournamentname;
> value: tournamentEvent tournamentName;
> callback: [:value | tournamentEvent tournamentName: value. self test: value
> on: html];
> onChange: (html jQuery ajax serializeThis)].

html is not valid in the context of a callback. When the callback is
evaluated the response connected to the html canvas you are referring
to has already been sent to the client. Slime would detect such
mistakes.

> #potsize is the id: of another field in the dialog. My callback works, but
> the DOM is not updated. What is the correct way to update other DOM elements
> in this fashion?

Try something along:

    onChange: (html jQuery ajax
        serializeThis;
        html: [ :r |
           " gee, we have a new renderer "
           r render: DateAndTime now ])

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list