当我在海边2.9使用'jQuery ajax'时,为什么我的服务器端回调没有出现?

时间:2009-03-24 23:07:36

标签: jquery ajax seaside

我正试图在海边做这样的事情2.9

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'.

并且正如我所期望的那样,我的div与stratId会被追加,但我的吱吱声图像中没有检查窗口?什么是正确的方法?

1 个答案:

答案 0 :(得分:5)

答案在JQueryInstance的方法评论的第二部分&gt;&gt; #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."

而是将您的回调代码放入jQuery回调本身,即#script:block。