gpt4 book ai didi

jquery - 仅在 Chrome 中存在 KendoAutoComplete 问题

转载 作者:行者123 更新时间:2023-12-01 05:34:14 25 4
gpt4 key购买 nike

enter image description here

enter image description here

当我输入任何用户名时,它会显示上述错误。但是当我们在 Firefox 和 Internet Explorer 中打开它时,它工作正常。下面是我的代码

 function GetActiveEmployeeNames() {
//debugger;
$.ajax({
type: "POST",
url: "VerveWall.aspx/GetActiveEmployeeNames",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
OnSucceeded(response.d, null, null);
},
failure: function (response) {
//alert(response);
}
});
}

它调用下面的函数

 var source = [];
function OnSucceeded(result, userContext, methodName) {
//debugger;
//source = "";
if (result.length > 0) {
if (source.length < 1) {
for (var i = 0; i <= result.length - 1; i++) {
source.push({
"empId": result[i].Id,
"employeeName": result[i].Employee_Name,
"firstName": result[i].FirstName,
"middleName": result[i].MiddleName,
"lastName": result[i].LastName,
"photographFileName": result[i].PhotographFileName
});
}
}
}
bindPost();
}

它调用bindPost函数

  function bindPost() {
//debugger;
var highlight_users = new Array();
$("#<%=txtPostMessage.ClientID%>").kendoAutoComplete({
separator: " ",
filter: "contains",
dataTextField: "employeeName",
dataSource: source,
minLength: 3,
placeholder: "What's on your mind...",
template: '<img src="upload/Photograph/${data.photographFileName}" width=30 height=30/>&nbsp;${data.employeeName}',
height: 370,
select: function (data) {
tagging_users.push(data.empId);
highlight_users.push(data.firstName);
highlight_users.push(data.lastName);

$("#<%=txtPostMessage.ClientID%>").highlightTextarea('enable');
jQuery("#<%=txtPostMessage.ClientID%>").highlightTextarea({
words: highlight_users,
color: "#aacccc"
});
}

}).data("kendoAutoComplete");

}

最佳答案

您使用什么版本的剑道?如果从 2012 年开始更新,您将需要更新您的 jQuery请参阅Kendo UI prerequisites

关于jquery - 仅在 Chrome 中存在 KendoAutoComplete 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35031862/

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