I'm trying to do something like this in seaside 2.9
我想在海边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'.
and as I expect my div with stratId is getting appended but I'm not getting an inspect window in my squeak image? What's the right way to do this?
而且我希望我的div与stratId相加,但我的吱吱声图像中没有检查窗口?这样做的正确方法是什么?
1 个解决方案
#1
5
The answer is in the second part of the method comment of JQueryInstance>>#serializeThis:
答案是在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."
“序列化接收元素。请注意,这可能不适用于所有表单元素:(1)对于复选框和多选列表Seaside内部依赖于自动生成的其他隐藏表单元素,而是使用#serializeThisWithHidden(2)忽略submit-button回调,而是使用普通回调来触发特定的代码评估。“
Instead put your callback code into the jQuery callback itself, aka the #script: block.
而是将您的回调代码放入jQuery回调本身,即#script:block。
#1
5
The answer is in the second part of the method comment of JQueryInstance>>#serializeThis:
答案是在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."
“序列化接收元素。请注意,这可能不适用于所有表单元素:(1)对于复选框和多选列表Seaside内部依赖于自动生成的其他隐藏表单元素,而是使用#serializeThisWithHidden(2)忽略submit-button回调,而是使用普通回调来触发特定的代码评估。“
Instead put your callback code into the jQuery callback itself, aka the #script: block.
而是将您的回调代码放入jQuery回调本身,即#script:block。