<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 10:37 AM, Winfried Jacobs <span dir="ltr">&lt;<a href="mailto:news@winfried-jacobs.de" target="_blank" class="vt-p">news@winfried-jacobs.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">(sorry if this message comes up multiple times)<br>
<br>
Hello Mariano,<br>
<br>
JQAjax&gt;&gt;script: ist a callback, so you don&#39;t need both #callback: and #script: .<br>
Instead, you should merge both of your callback blocks into one:<br>
<div class=""><br>
     html jQuery ajax<br>
         serializeChildren: (html jQuery: &#39;#myFormID&#39;);<br>
</div>         script: [ :s |<br>
                 &quot;code from your first #callback: goes in here.&quot;<br>
                 &quot;...&quot;<br>
<div class=""><br>
                 self halt. s &lt;&lt; (s jQuery id: (&#39;tr1&#39;)) replaceWith:[:r | r<br>
html: &#39;mariano&#39; ]<br>
                 ]<br>
<br>
<br></div></blockquote><div><br></div><div>Hi Winfried,</div><div><br></div><div>You know...yesterday night, just before going to sleep, I realized that indeed, I could put by &quot;callback code&quot; inside the very same #script: and then from there re-render (replaceWith...) from there. </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
</div>One possible reason why your code doesn&#39;t work: #callback: and #script: are<br>
primary callbacks, but you can only register one primary callback for an ajax<br>
object.<br>
<br></blockquote><div><br></div><div>OK, I see. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However, you could register multiple secondary callbacks like #callback:value:<br>
#callback:json: etc.  But in your case, a secondary<br>
callback is unnecessary.<br>
<br></blockquote><div><br></div><div>OK, thanks for the explanation. I will read the web 2.0 chapter of the Dynamic Web Development..otherwise...why did I buy it? hahaha. </div><div><br></div><div>Thanks, </div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Cheers<br>
Winfried<br>
<br>
<br>
<br>
&gt; Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" class="vt-p">marianopeck@gmail.com</a>&gt; hat am 11. Juli 2014 um 04:23<br>
&gt; geschrieben:<br>
<div class="">&gt;<br>
&gt;  Well...not there yet...now I am able to render the new table row with all the<br>
&gt;&#39;mariano&#39;. And the row itself seems to reflect changes (the callback of the<br>
&gt;ajax is really executed). The problem now is that I don&#39;t know how to make my<br>
&gt;render script to happen AFTER the callback of the ajax. I tried #script:  ,<br>
&gt;#onComplete: and #onSuccess:  (just in case). What I need is to make the ajax<br>
&gt;call, serialize the form, execute the ajax callback, and then do the replace of<br>
&gt;the tr (with a script).<br>
&gt;   <br>
&gt;  The only one that seems to be executed later is #script: but when I do this,<br>
&gt;the callback of the ajax is not executed.<br>
&gt;   <br>
&gt;  Any ideas?<br>
&gt;   <br>
&gt;  Thanks,<br>
&gt;<br>
&gt;<br>
&gt;  On Thu, Jul 10, 2014 at 6:22 PM, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" class="vt-p">marianopeck@gmail.com</a><br>
</div><div class="">&gt;&lt;mailto:<a href="mailto:marianopeck@gmail.com" class="vt-p">marianopeck@gmail.com</a>&gt; &gt; wrote:<br>
&gt;    &gt; &gt;    ouuuuch<br>
&gt; &gt;     <br>
&gt; &gt;    sorrryyyy by bad hahahhaha. Very funny. I will explain later. Don&#39;t loose<br>
&gt; &gt;your time.<br>
&gt; &gt;     <br>
&gt; &gt;    Best,<br>
&gt; &gt;     <br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;    On Thu, Jul 10, 2014 at 6:00 PM, Esteban A. Maringolo<br>
</div><div class="">&gt; &gt;&lt;<a href="mailto:emaringolo@gmail.com" class="vt-p">emaringolo@gmail.com</a> &lt;mailto:<a href="mailto:emaringolo@gmail.com" class="vt-p">emaringolo@gmail.com</a>&gt; &gt; wrote:<br>
&gt; &gt;      &gt; &gt; &gt; Maybe you should use #onComplete: instead of #script: in your<br>
&gt; &gt;JQAjax object.<br>
&gt; &gt; &gt;      _______________________________________________<br>
&gt; &gt; &gt;      seaside mailing list<br>
&gt; &gt; &gt;      <a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a><br>
</div>&gt; &gt; &gt;&lt;mailto:<a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a>&gt;<br>
<div class="HOEnZb"><div class="h5">&gt; &gt; &gt;      <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="vt-p">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>

&gt; &gt; &gt;    &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;     <br>
&gt; &gt;    --<br>
&gt; &gt;    Mariano<br>
&gt; &gt;    <a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
&gt; &gt;  &gt;<br>
&gt;<br>
&gt;   <br>
&gt;  --<br>
&gt;  Mariano<br>
&gt;  <a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
&gt;  _______________________________________________<br>
&gt;  seaside mailing list<br>
&gt;  <a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a><br>
&gt;  <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="vt-p">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
&gt;<br>
<br>
 <br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="vt-p">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
</div></div>