[Seaside] Basic question about AJAX and callbacks
Mariano Martinez Peck
marianopeck at gmail.com
Thu Jul 10 19:22:42 UTC 2014
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:
(html jQuery ajax
serializeChildren: (html jQuery: '#myFormID');
script: [ :s | self halt. s << (s jQuery id: ('tr1')) replaceWith:[:r | r
html: 'mariano' ]]
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
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...
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.".
Any ideas what I am doing wrong? Probably many things...
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside