Re: [Seaside] Why isn’t my serverside callback occurring when I use ‘jQuery ajax’ in 2.9?

Julian Fitzell jfitzell at gmail.com
Wed Mar 25 08:09:01 UTC 2009


On Wed, Mar 25, 2009 at 12:39 AM, Lukas Renggli <renggli at gmail.com> wrote:

> > I'm trying to do something like this in seaside 2.9
> >
> > html button
> >  onClick: (html jQuery ajax
> >  serialize: (html jQuery this);
> >  script: [:s | s << (s jQuery id: stratId) append: [html text:
> > 'bing'. html break]]);
> >  callback: [2 inspect];
> > with: 'add option'.
> >
> > and as I expect my div with stratId is getting appended but I'm not
> > getting an inspect window in my squeak image? What's the right way to
> > do this?
>
> The answer is in the second part of the method comment of #serializeThis:
>
> "Serialize the receiving element. Note that this might not work for
> all form elements: (1) for check-boxes and multi-select lists Seaside
> internally depends on an additional hidden form element that is
> generated automatically, instead use #serializeThisWithHidden (2)
> submit-button callbacks are ignored, instead use a normal callback to
> trigger specific code evaluation."
>
> Instead put your callback code into the jQuery callback itself (the
> #script: block).
>
>
This is presumably because the form doesn't actually get submitted?

Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090325/348f735c/attachment.htm


More information about the seaside mailing list