<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"><<a href="mailto:news@winfried-jacobs.de" target="_blank" class="vt-p">news@winfried-jacobs.de</a>></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>>script: ist a callback, so you don'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: '#myFormID');<br>
</div> script: [ :s |<br>
"code from your first #callback: goes in here."<br>
"..."<br>
<div class=""><br>
self halt. s << (s jQuery id: ('tr1')) replaceWith:[:r | r<br>
html: 'mariano' ]<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 "callback code" 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'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>
> Mariano Martinez Peck <<a href="mailto:marianopeck@gmail.com" class="vt-p">marianopeck@gmail.com</a>> hat am 11. Juli 2014 um 04:23<br>
> geschrieben:<br>
<div class="">><br>
> Well...not there yet...now I am able to render the new table row with all the<br>
>'mariano'. And the row itself seems to reflect changes (the callback of the<br>
>ajax is really executed). The problem now is that I don't know how to make my<br>
>render script to happen AFTER the callback of the ajax. I tried #script: ,<br>
>#onComplete: and #onSuccess: (just in case). What I need is to make the ajax<br>
>call, serialize the form, execute the ajax callback, and then do the replace of<br>
>the tr (with a script).<br>
> <br>
> The only one that seems to be executed later is #script: but when I do this,<br>
>the callback of the ajax is not executed.<br>
> <br>
> Any ideas?<br>
> <br>
> Thanks,<br>
><br>
><br>
> On Thu, Jul 10, 2014 at 6:22 PM, Mariano Martinez Peck <<a href="mailto:marianopeck@gmail.com" class="vt-p">marianopeck@gmail.com</a><br>
</div><div class="">><mailto:<a href="mailto:marianopeck@gmail.com" class="vt-p">marianopeck@gmail.com</a>> > wrote:<br>
> > > ouuuuch<br>
> > <br>
> > sorrryyyy by bad hahahhaha. Very funny. I will explain later. Don't loose<br>
> >your time.<br>
> > <br>
> > Best,<br>
> > <br>
> ><br>
> ><br>
> > On Thu, Jul 10, 2014 at 6:00 PM, Esteban A. Maringolo<br>
</div><div class="">> ><<a href="mailto:emaringolo@gmail.com" class="vt-p">emaringolo@gmail.com</a> <mailto:<a href="mailto:emaringolo@gmail.com" class="vt-p">emaringolo@gmail.com</a>> > wrote:<br>
> > > > > Maybe you should use #onComplete: instead of #script: in your<br>
> >JQAjax object.<br>
> > > _______________________________________________<br>
> > > seaside mailing list<br>
> > > <a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a><br>
</div>> > ><mailto:<a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a>><br>
<div class="HOEnZb"><div class="h5">> > > <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>
> > > > ><br>
> ><br>
> > <br>
> > --<br>
> > Mariano<br>
> > <a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
> > ><br>
><br>
> <br>
> --<br>
> Mariano<br>
> <a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><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>
><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>