2009-03-24 11 views
2

私は海辺2.9海辺2.9で 'jQuery ajax'を使用すると、サーバーサイドコールバックが発生しないのはなぜですか?

html button 
onClick: (html jQuery ajax 
    serialize: (html jQuery this); 
    script: [:s | s << (s jQuery id: stratId) append: [html text: 'bing'. html break]]); 
callback: [2 inspect]; 
with: 'add option'. 

にこのような何かをしようとしていると私は期待どおりstratIdと私のdivが追加取得されたが、私は私のきしみ画像で検査ウィンドウが届きませんか?これを行う正しい方法は何ですか?

答えて

5

答えはJQueryInstance >>#のserializeThisの方法コメントの後半部分である:ブロック:

"Serialize the receiving element. Note that this might not work for all form elements: (1) for check-boxes and multi-select lists Seaside internally depends on an additional hidden form element that is generated automatically, instead use #serializeThisWithHidden (2) submit-button callbacks are ignored, instead use a normal callback to trigger specific code evaluation."

は、代わりに#script別名、jQueryのコールバック自体にコールバックコードを置きます。

関連する問題