【发布时间】:2011-02-13 16:17:23
【问题描述】:
这个真的很简单。我有一个<select>,我想根据选择更新一些内部状态。无需重新显示任何内容。问题是在进行选择和 AJAX 请求之后,列表会丢失其内容。
renderContentOn: html
|value myId|
html form with: [
html select list: #('one' 'two' 'tree' 'four' 'five');
id: (myId := html nextId);
callback: [ :v | value := myId ];
onChange: (
html prototype updater
triggerFormElement: myId;
callback: [:h | value "do something with the value here"];
return: false
).
]
【问题讨论】: