javascript 弹出窗口不会弹出,因为绑定已经分配
javascript popup doesn't pop because bindings already assigned
c#“/Clients/ClientSelectDataTable”被调用并且 returns。
self.LookupClient = function () {
$.ajax({
type: 'POST',
url: '/Clients/ClientSelectDataTable'
}).done(function (msg) {
//grab the partial from the controller
$("#SelectClient").html('');
$("#SelectClient").html(msg);
//initialize the js
theClientPicker = new ClientSelectModel('ClientSelectDataTable', '/API/GetAllClients', AssignClient, self.CancelClientSelect, "Select");
ko.applyBindings(theClientPicker, $("#SelectClient")[0]);
$.fancybox("#SelectClient", { //launch ClientSelect widget
modal: true,
afterClose: function () {
theClientPicker.Dispose();
ko.cleanNode($("#SelectClient")[0]);
}
});
});
}
这里抛出异常
ko.applyBindings(theClientPicker, $("#SelectClient")[0]);
...
if (!sourceBindings) {
if (alreadyBound) {
throw Error("You cannot apply bindings multiple times to the same element.");
我可以捕捉到异常,但是弹出窗口不起作用,因为按钮上的事件没有分配。
这是一个新的 theClientPicker,所以我看不出它是如何分配的。
找到问题。
这是 3.4.2 和 3.5.0 之间引入的错误或淘汰赛的重大变化。
恢复并冻结 3.4.2 修复了它。
是否有正确的举报方式?
c#“/Clients/ClientSelectDataTable”被调用并且 returns。
self.LookupClient = function () {
$.ajax({
type: 'POST',
url: '/Clients/ClientSelectDataTable'
}).done(function (msg) {
//grab the partial from the controller
$("#SelectClient").html('');
$("#SelectClient").html(msg);
//initialize the js
theClientPicker = new ClientSelectModel('ClientSelectDataTable', '/API/GetAllClients', AssignClient, self.CancelClientSelect, "Select");
ko.applyBindings(theClientPicker, $("#SelectClient")[0]);
$.fancybox("#SelectClient", { //launch ClientSelect widget
modal: true,
afterClose: function () {
theClientPicker.Dispose();
ko.cleanNode($("#SelectClient")[0]);
}
});
});
}
这里抛出异常 ko.applyBindings(theClientPicker, $("#SelectClient")[0]);
...
if (!sourceBindings) {
if (alreadyBound) {
throw Error("You cannot apply bindings multiple times to the same element.");
我可以捕捉到异常,但是弹出窗口不起作用,因为按钮上的事件没有分配。
这是一个新的 theClientPicker,所以我看不出它是如何分配的。
找到问题。
这是 3.4.2 和 3.5.0 之间引入的错误或淘汰赛的重大变化。
恢复并冻结 3.4.2 修复了它。
是否有正确的举报方式?