在Seaside JQuery回调中获取Javascript接收器的价值

时间:2011-01-18 06:41:02

标签: javascript jquery callback seaside

我的问题类似于this - 如何获得javascript 这个(这样我可以假设它的表单文本输入得到它的值)?我试图将文本输入的值发送到您看到的回调:

html textInput id: #thingy; 
 onClick: (html jQuery ajax 
  callback:[:x | x inspect]
  value:(html jQuery event currentTarget ????));
   with: 'I am the value the poster wants to see inspected in the above callback block!'.

2 个答案:

答案 0 :(得分:1)

如果要在单击时单击绑定serializeThisWithHidden on onClick事件,则要触发回调。

html textInput id: #thingy; 
 onClick: (html jQuery ajax serializeThisWithHidden);
  callback:[:x | x inspect];
  with: 'I am the value the poster wants to see inspected in the above callback block!'.

出于我的想法:)

答案 1 :(得分:1)

要获取ajax回调中的值,您可以使用

html textInput id: #thingy; 
        onClick: (html jQuery ajax 
        callback:[:x | x inspect] value: html jQuery new value);
        with: 'I am the value the poster wants to see inspected in the above callback block!'.