<div dir="ltr"><div style><font face="arial, sans-serif">Adding return: false should work. It you want to stop the default submit action and have the button act as ajax only.</font></div><span style="font-family:arial,sans-serif;font-size:13px"><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>renderContentOn: html</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">   html form: [</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">    html textInput</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">        id: &#39;text&#39;;</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">        class: &#39;submit&#39;;</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">        with: &#39;Test für Ajax-Actions&#39;.</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">        html submitButton</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">           callback: [];</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">            onClick: (((html jQuery ajax)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">                onBeforeSend: ((html jQuery class: &#39;submit&#39;) hide);</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">                callback: [self doSomeStuff];</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">                onComplete: ((html jQuery class: &#39;submit&#39;) show);</span><div>
<span style="font-family:arial,sans-serif;font-size:13px">                return: false));</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">            with: &#39;Test mit onBeforeSend&#39;].</span><br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 19 March 2013 15:41, <a href="mailto:jtuchel@objektfabrik.de">jtuchel@objektfabrik.de</a> <span dir="ltr">&lt;<a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So maybe I should spend a few more words on what I mean by &quot;working&quot;.<br>
<br>
My intention is to hide certain cotrols on screen while a longer running ajax call is being executed. After the callback was completed, the controls should come back.<br>
When I say it&#39;s not working, I mean that the ajax callback is executed, even in Chrome, but the hiding of controls doesn&#39;t happen.<br>
<br>
Once I&#39;ve got this running reliably on at least four different browsers, I really want to use some &quot;please wait&quot; lightbox dialog, but I wanted to start simple - and failed...<br>
<br>
Joachim<br>
<br>
Am 19.03.13 14:23, schrieb <a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a>:<div class="HOEnZb"><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hmmm,<br>
<br>
I sent this message using Nabble, and it seems it swallowed my code samples that I had put between &lt;raw&gt; tags. I guess I have general troubles when I wrap tags into between others ;-)))<br>
<br>
Anyways: here are the two code samples, first the one that works:<br>
<br>
renderContentOn: html<br>
    html textInput<br>
        id: &#39;text&#39;;<br>
        class: &#39;submit&#39;;<br>
        with: &#39;Test für Ajax-Actions&#39;.<br>
        html submitButton<br>
            callback: [];<br>
            onClick: (((html jQuery ajax)<br>
                onBeforeSend: ((html jQuery class: &#39;submit&#39;) hide);<br>
                callback: [self doSomeStuff];<br>
                onComplete: ((html jQuery class: &#39;submit&#39;) show)));<br>
            with: &#39;Test mit onBeforeSend&#39;.<br>
<br>
<br>
and here is the one that doesn&#39;t:<br>
<br>
renderContentOn: html<br>
   html form: [<br>
    html textInput<br>
        id: &#39;text&#39;;<br>
        class: &#39;submit&#39;;<br>
        with: &#39;Test für Ajax-Actions&#39;.<br>
        html submitButton<br>
           callback: [];<br>
            onClick: (((html jQuery ajax)<br>
                onBeforeSend: ((html jQuery class: &#39;submit&#39;) hide);<br>
                callback: [self doSomeStuff];<br>
                onComplete: ((html jQuery class: &#39;submit&#39;) show)));<br>
            with: &#39;Test mit onBeforeSend&#39;].<br>
<br>
The last one doesn&#39;t work in chrome and Safari. In Firefox it seems to call the ajax callback very unreliably.<br>
<br>
Any ideas?<br>
<br>
Joachim<br>
<br>
<br>
Am 19.03.13 14:18, schrieb jtuchel:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi there,<br>
<br>
I am back with this issue. I finally found the difference that renders these<br>
two options unusable. Once you wrap the submitButton into a form tag, the<br>
ajax thingie is screwed, at least in Chrome.<br>
<br>
So there is a significant difference between this:<br>
<br>
<br>
<br>
<br>
and this:<br>
<br>
<br>
<br>
<br>
While the first example works as expected, the button in a form doesn&#39;t in<br>
chrome.<br>
Is this a known limitation that I should have been aware of? Is there any<br>
reason for this difference in behavior? How do other seasiders handle this?<br>
Are forms bad per se in conjunction with Ajax??? This woulkd be totally new<br>
to me...<br>
<br>
Joachim<br>
<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
View this message in context: <a href="http://forum.world.st/jQuery-Ajax-do-something-before-and-after-tp4664568p4677296.html" target="_blank">http://forum.world.st/jQuery-<u></u>Ajax-do-something-before-and-<u></u>after-tp4664568p4677296.html</a><br>

Sent from the Seaside General mailing list archive at Nabble.com.<br>
______________________________<u></u>_________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.<u></u>squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.<u></u>org/cgi-bin/mailman/listinfo/<u></u>seaside</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.<u></u>squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.<u></u>org/cgi-bin/mailman/listinfo/<u></u>seaside</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.<u></u>squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.<u></u>org/cgi-bin/mailman/listinfo/<u></u>seaside</a><br>
</div></div></blockquote></div><br></div>