[Seaside] Setting checkboxes using JQuery

Jan van de Sandt jvdsandt at gmail.com
Fri Dec 12 13:53:03 UTC 2008


Hello,

I'm using Seaside 2.9, Squeak and the new Seaside JQuery support. I'm
creating a table where each row has a checkbox, just like GMail I want to
provide a "Select all" and a 'Select none" link.

My idea is to use JQuery to select or unselect all checkboxes:

    html anchor
        onClick: ((html jQuery expression: ':checkbox') value: 'checked');
        with: 'All, '.

The problem is that this adds the value="check" attribute to all checkbox
elements but I need the checked="checked" attribute!

I also tried:

    html anchor
        onClick: ((html jQuery expression: ':checkbox') do: [ :each | each
click ]);
        with: 'All, '.

But this doesn't work because the JQueryInstance object has no click method.

Can anyone help me out?

Jan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20081212/886cf01f/attachment.htm


More information about the seaside mailing list