[Seaside] Re: Form, serialize:, answer: and callback:
Dave
lasmiste at gmail.com
Thu Jun 13 10:35:51 UTC 2013
Johan Brichau-2 wrote
> Is the form serialized?
Hi Johan,
I dived a bit more in the issue. The form is some way "serialized" (I'm
going to explain why I put serialized between quotes [1]), but I think there
is a problem with webkit (chrome, safari), instead firefox is working.
I replicated the behavior with a couple of components, so you can test by
yourself:
FirstComponent>>
renderContentOn: html
html anchor
callback: [ self call: SecondComponent new ];
with: 'Call second component'
SecondComponent>>
renderContentOn: html
html
form: [
html textInput.
html button
onClick:
(html jQuery ajax
serializeForm;
onComplete: (html javascript callback: [ self answer ]));
text: 'ok' ].
If you test the above code on firefox (v21.0 on osx 10.8.4) it works (i.e.
answer is called), but it doesn't on chrome nor on safari.
But I discovered that there are no XHR [1], if you open firebug, or the
equivalent in chrome/safari, you notice that if you click on the ok button
there is no trace of XHRs.
You can better spot it if you change the code this way:
SecondComponent>>
renderContentOn: html
html
form: [
html textInput.
html button
onClick:
(html jQuery ajax
serializeForm;
onComplete: (html javascript callback: [ self answer ]));
text: 'ok' ].
html button
onClick: html jQuery ajax serializeThis;
text: 'test'
If you click on 'test' button you'll see XHR, but if you click on 'ok'
don't. That puzzles me a lot.
Hints? :-)
Cheers
Dave
--
View this message in context: http://forum.world.st/Form-serialize-answer-and-callback-tp4692893p4693102.html
Sent from the Seaside General mailing list archive at Nabble.com.
More information about the seaside
mailing list