[Seaside] JQuery dialog radio buttons

Ramiro Diaz Trepat ramiro at diaztrepat.name
Mon Dec 28 10:54:54 UTC 2009


Thank you very much for your replies.
Evidently there's still quite a few basic things I don't know about ajax /
jQuery.
What is (conceptually) #serializeForm, in what situations should be used?
By the way, if I try adding this simiple onChange: to the radio buttons, I
still don't get the callbacks' block to be called.

html radioButton
group: group;
callback: [self newSimulationTemplate: template];
onChange: (html jQuery ajax serializeForm);
with: [
.....

May be Lukas meant something different?
Cheers


r


On Mon, Dec 28, 2009 at 9:57 AM, Lukas Renggli <renggli at gmail.com> wrote:

> > I think if you look in JQFormFunctionalTest's
> > #renderLabel:control:model:on:, you'll see that it is outputing
> > javascript that serializes the form fields... seems kind of
> > complicated though for what you want. I imagine you can just do
> > something like (untested):
>
> Yeah, this is a bit complicated because it tries to render all
> possible form controls using the same method.
>
> > html radioButton
> >   group: group;
> >   onChange: (html jQuery ajax callback: [ ... ]);
> >   with: [...]
>
> The simplest is if you serialize the complete form. For example if you
> register the following script for change events on each form element
>
>     html jQuery ajax serializeForm
>
> you will trigger all callbacks of the enclosing form whenever
> something changes, essentially keeping the form persistent all the
> time.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20091228/d711d9ff/attachment.htm


More information about the seaside mailing list