2009-03-24 6 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 내 사업부가 추가지고하지만 내 찍찍 이미지의 검사 창을받지 못했습니다? 이 작업을 수행하는 올바른 방법은 무엇입니까?

답변

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와 콜백 자체에 콜백 코드를 삽입 : 블록을.