[Seaside] jQuery Ajax: do something before and after
Paul DeBruicker
pdebruic at gmail.com
Tue Jan 22 17:57:48 UTC 2013
On 01/22/2013 08:30 AM, jtuchel wrote:
> s submitButton
> onClick: (
> s jQuery ajax
> onBeforeSend: (((s jQuery class: 'submit') hide));
> callback: [self doSomething];
> onComplete: ((s jQuery class: 'submit') show));
> with: 'Click here'.
I'd do it like this:
s submitButton
onClick: (s jQuery class: 'submit') hide) , (
s jQuery ajax
callback: [self doSomething];
onComplete: ((s jQuery class: 'submit') show));
with: 'Click here'.
So when clicked the button is hidden then the ajax callback is called
and when the ajaz callback completes the button is shown.
More information about the seaside
mailing list