[Seaside] Re: JQueryMobile initial release

Nick Ager nick.ager at gmail.com
Thu Oct 27 07:13:57 UTC 2011


Hi Rolf,

I got it working, I needed to add the click event to the label instead of
> the checkbox. makes sense as the checkbox will be hidden. so this is more a
> jquerymobile problem than something you control.
> This solution does not work on an ipad (ios5) however. The clickevent
> doesnt
> get fired on the label, nor does it on the checkbox, outside the 'your
> problem field' as well ;)
>
> It seems all events fire twice, in the demo also, is this expected
> behaviour? It seems to be like this for all events I tried tap, click,
> virtualmouseup and used Chrome and Safari on ipad IOS5 to test this.
>

I thought it would be good to clear this up for the list.

I've added some samples which show how to dynamically update using Ajax:
http://jquerymobile.seasidehosting.st/seaside/javascript/jquery-mobile/Ajax-forms

You came across two issues. Checkboxes use a hidden field. The standard
#serializeThisWithHidden didn't work on jQueryMobile as the jQuery it
creates:

self serialize: (self jQuery this
next: 'input:hidden';
andSelf)

Didn't work the div tags jQuery mobile adds around checkboxes. I've added:

jqmSerializeThisWithHidden
"Serialize the receiving form element and a following hidden form element.
This is required in case of a check-box or multi-select list.
 jQueryMobile inserts a div between the element and the checkbox so the
'standard'
#serializeThisWithHidden doesn't work
WARNNG: This is fragile to changes in jQueryMobile's markup"
 self serialize: (self jQuery this parent
next: 'input:hidden';
add: (self jQuery this))

which solves this problem but is a little fragile. The samples:
http://jquerymobile.seasidehosting.st/seaside/javascript/jquery-mobile/Ajax-formsshould
two methods for serialising checkboxes.

The events firing twice was a bug. This is now fixed in the latest release

Thanks

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111027/eea7837b/attachment.htm


More information about the seaside mailing list