[Seaside] Checkbox with JQuery

Ryan Simmons ryan.craig.simmons at gmail.com
Wed May 23 12:46:24 UTC 2012


I think it is something like this

onChange:
                                                               (html jQuery
ajax

  serializeChildren: (htnl jQuery id: parentID);

  script: [:script |  checkBox ifTrue: [script alert: 'True']

                                         ifFalse: [script alert: 'False']])

On 23 May 2012 14:36, janus <janus1859 at googlemail.com> wrote:

> Hello,
> I would like to use a checkbox with JQuery. How is it possible to use the
> onchange-event to show the checked-status of the checkbox.
> This is my approach so far:
>
> /renderCheckBoxFor: eachAccount on: html
>        | ID parentID checkBox |
>        parentID := html nextId.
>        ID := html nextId.
>        html div
>                id: parentID;
>                with: [
>                                        html label
>                                                for: ID;
>                                                with: 'CheckBox: '.
>                                        html checkbox
>                                                id: ID;
>                                                value: checkBox;
>                                                callback: [ :value |
> checkBox := value ];
>                                                onChange:
>                                                                (html
> jQuery ajax
>
>      callback: [ :value | Transcript show: value; cr ]
>
>      value:
>
>              (html jQuery this
>
>                      parent: '#' , parentID;
>
>                      find: ('#', ID)) serialize) ]./
>        html break
>
> --
> View this message in context:
> http://forum.world.st/Checkbox-with-JQuery-tp4631550.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> 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/20120523/72c7f400/attachment.htm


More information about the seaside mailing list