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

发布于 2024-10-13 03:59:42 字数 465 浏览 7 评论 0原文

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

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

My question is similar to this - how do get what would be javascript this (so that I can get its value assuming its a form text input) ? I am trying to send the value of a text input to the callback you see:

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

枕梦 2024-10-20 03:59:42

如果您想在单击时触发回调,只需在 onClick 事件上绑定 serializeThisWithHidden 即可。

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

从我的脑海中消失:)

If you want to fire the callback when you click simply bind serializeThisWithHidden on the onClick event.

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

Out of my head :)

预谋 2024-10-20 03:59:42

要获取 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!'.

To get the value in the ajax callback you would use

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!'.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文