[Seaside] Re: jQuery Ajax: do something before and after
jtuchel at objektfabrik.de
jtuchel at objektfabrik.de
Tue Mar 19 13:23:41 UTC 2013
Hmmm,
I sent this message using Nabble, and it seems it swallowed my code
samples that I had put between <raw> tags. I guess I have general
troubles when I wrap tags into between others ;-)))
Anyways: here are the two code samples, first the one that works:
renderContentOn: html
html textInput
id: 'text';
class: 'submit';
with: 'Test für Ajax-Actions'.
html submitButton
callback: [];
onClick: (((html jQuery ajax)
onBeforeSend: ((html jQuery class: 'submit') hide);
callback: [self doSomeStuff];
onComplete: ((html jQuery class: 'submit') show)));
with: 'Test mit onBeforeSend'.
and here is the one that doesn't:
renderContentOn: html
html form: [
html textInput
id: 'text';
class: 'submit';
with: 'Test für Ajax-Actions'.
html submitButton
callback: [];
onClick: (((html jQuery ajax)
onBeforeSend: ((html jQuery class: 'submit') hide);
callback: [self doSomeStuff];
onComplete: ((html jQuery class: 'submit') show)));
with: 'Test mit onBeforeSend'].
The last one doesn't work in chrome and Safari. In Firefox it seems to
call the ajax callback very unreliably.
Any ideas?
Joachim
Am 19.03.13 14:18, schrieb jtuchel:
> Hi there,
>
> I am back with this issue. I finally found the difference that renders these
> two options unusable. Once you wrap the submitButton into a form tag, the
> ajax thingie is screwed, at least in Chrome.
>
> So there is a significant difference between this:
>
>
>
>
> and this:
>
>
>
>
> While the first example works as expected, the button in a form doesn't in
> chrome.
> Is this a known limitation that I should have been aware of? Is there any
> reason for this difference in behavior? How do other seasiders handle this?
> Are forms bad per se in conjunction with Ajax??? This woulkd be totally new
> to me...
>
> Joachim
>
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/jQuery-Ajax-do-something-before-and-after-tp4664568p4677296.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
More information about the seaside
mailing list