[Seaside] Click, Replace and Submit
Robert Sirois
watchlala at hotmail.com
Tue Aug 2 14:56:36 UTC 2011
Are you trying to query the server for validation before submitting or have client-side javascript to the validation?
Here's some ideas:
#onClick: ((html jQuery: #submit) html: 'Processing').#onClick: (html jQuery ajax callback: [ "function" ]; onSuccess: ((html jQuery: #form) html: 'Thank you!'; addClass: 'ui-state-highlight').
RS
> From: renggli at gmail.com
> Date: Tue, 2 Aug 2011 16:29:19 +0200
> Subject: Re: [Seaside] Click, Replace and Submit
> To: seaside at lists.squeakfoundation.org
>
> >> This removes the button from the page, before the form is actually
> >> submitted.
> >
> > Ok, so how can I replace the button by some other element (text/image) and
> > trigger an explicit submit? I could have missed that in the docs, so please
> > feel free to point me to some page explaining this!
>
> This has nothing to do with JQuery and/or Seaside, this is just HTTP,
> HTML and JavaScript. The form submission is part of the browser event
> handling of the button, but your click handler interfers with this
> when you remove the button.
>
> > In the meantime I can live with this. It's not as nice as I intended it, but
> > it works for now:
> >
> > onClick: ((html jQuery id: #submit) value: 'Processing';
> > attributeAt: #disabled put: #true);
>
> Not sure, but I would say that doesn't work either: disabled buttons
> typically do not trigger a form submission.
>
> Also, why do you write '#true' instead of 'true'?
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> 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/20110802/ec4072a4/attachment.htm
More information about the seaside
mailing list