[Seaside] Checkbox with JQuery

Michael Backmann janus1859 at googlemail.com
Wed May 23 12:50:09 UTC 2012


Thank you very much! It works perfectly.

Am 23.05.2012 14:46, schrieb Ryan Simmons:
> 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 
> <mailto: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
>     <mailto:seaside at lists.squeakfoundation.org>
>     http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
> _______________________________________________
> 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/56b39eb7/attachment.htm


More information about the seaside mailing list