javascript弹出窗口不';无法弹出,因为绑定已分配
调用并返回c#'/Clients/ClientSelectDataTable'javascript弹出窗口不';无法弹出,因为绑定已分配,javascript,jquery,knockout-3.0,Javascript,Jquery,Knockout 3.0,调用并返回c#'/Clients/ClientSelectDataTable' self.LookupClient = function () { $.ajax({ type: 'POST', url: '/Clients/ClientSelectDataTable' }).done(function (msg) { //grab the partial fro
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(客户机,$(“#选择客户机”)[0])
if (!sourceBindings) {
if (alreadyBound) {
throw Error("You cannot apply bindings multiple times to the same element.");
我可以捕捉到异常,但是弹出窗口不起作用,因为按钮上的事件没有分配
这是一个新的客户端icker,因此我看不出它是如何分配的。发现了问题。这是在3.4.2和3.5.0之间引入的淘汰中的一个bug或突破性更改。
恢复到3.4.2并在其上冻结将修复此问题 有没有适当的方法来报告这一点