<div dir="ltr">Hi guys,<div><br></div><div>I am trying to have a button that instead of doing a form submit and a whole page render, simply serializes the form and tries to re-render something. My code is this:</div><div><br>
</div><div><div>html tbsButton</div><div><span class="" style="white-space:pre">                        </span>bePrimary;</div><div><span class="" style="white-space:pre">                        </span>bePush;</div><div><span class="" style="white-space:pre">                        </span>value: &#39;Save&#39;;</div>
<div><span class="" style="white-space:pre">                        </span>onClick:  </div><div><span class="" style="white-space:pre">                </span>                (html jQuery ajax</div><div><span class="" style="white-space:pre">                </span>                        serializeChildren: (html jQuery: &#39;#myFormID&#39;);</div>
<div><span class="" style="white-space:pre">                                                </span>callback: [ </div><div><span class="" style="white-space:pre">                                                        </span>self halt. </div><div><span class="" style="white-space:pre">                                                        </span></div><div><span class="" style="white-space:pre">                                                        </span> ]</div>
<div><span class="" style="white-space:pre">                                        </span>;</div><div><span class="" style="white-space:pre">                                        </span>script: [ :s | self halt. s &lt;&lt; (s jQuery id: (&#39;tr1&#39;)) replaceWith:[:r | r html: &#39;mariano&#39; ]]</div>
<div><span class="" style="white-space:pre">                        </span>)</div></div><div><br></div><div><br></div><div>So I am declaring this button which is #bePush (to avoid a whole page render). Then with #serializeChildren I serialize the form (is this correct?), and finally with #script: I try to re-render again that row (in the example I simply display &#39;mariano&#39;). &#39;tr1&#39; is the correct id of the correct TR. </div>
<div><br></div><div>I want #script: to be called AFTER the ajax callback. But it seems that if I define a #script: then the AJAX callback is not executed :( If I don&#39;t put the #script:, it is called...</div><div><br></div>
<div>Also..when I click on that button, in the FF dev console I see &quot;Use of attributes&#39; specified attribute is deprecated. It always returns true.&quot;. </div><div><br></div><div>Any ideas what I am doing wrong? Probably many things...</div>
<div><br></div><div>Thanks in advance, </div><div><br></div><div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
</div></div>