2
enter image description hereKendoAutoComplete вопрос в хроме только
, когда я ввести любое имя пользователя, то он показывает это выше error.but, когда мы открываем его в 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/> ${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");
}
Кендо UI v2011.3.1413 –
пожалуйста, оцените мой вопрос, если и нравится, так что я могу получить репутацию –