gpt4 book ai didi

jquery - 为什么我在seaside 2.9中使用 'jQuery ajax'时没有发生服务器端回调?

转载 作者:行者123 更新时间:2023-12-01 03:06:24 26 4
gpt4 key购买 nike

我正在尝试在 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'.

正如我所期望的那样,我的带有 stratId 的 div 被附加,但我的吱吱图像中没有看到检查窗口?正确的做法是什么?

最佳答案

答案在JQueryInstance>>#serializeThis方法注释的第二部分:

“序列化接收元素。请注意,这可能不适用于所有表单
元素: (1) 对于复选框和多选列表 Seaside 内部依赖于自动生成的附加隐藏表单元素,而不是使用 #serializeThisWithHidden (2) 忽略提交按钮回调,而是使用普通回调来触发特定的代码评估。”

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

关于jquery - 为什么我在seaside 2.9中使用 'jQuery ajax'时没有发生服务器端回调?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/679607/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com