<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: 'Save';</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: '#myFormID');</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 << (s jQuery id: ('tr1')) replaceWith:[:r | r html: 'mariano' ]]</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 'mariano'). 'tr1' 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'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 "Use of attributes' specified attribute is deprecated. It always returns true.". </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>