我正在使用SharePoint2013中的列表。在按钮上单击列表项将更新,并触发AJAX事件以刷新列表。 在搜索网络时找到了该活动:https://www.eliostruyf.com/ajax-refresh-item-rows-in-sharepoint-2013-view/ 我的代码看起来像这样;
function onQuerySucceeded() {
// Set Ajax refresh context
var evtAjax = {
currentCtx: ctx,
csrAjaxRefresh: true
};
// If set to false all list items will refresh
ctx.skipNextAnimation = true;
// Initiate Ajax Refresh on the list
AJAXRefreshView(evtAjax, SP.UI.DialogResult.OK);
}
现在我的问题。代码工作的一半时间绝对正常,但另一半,在这个Ajax请求中的某个地方,返回的是html而不是json,这导致了一个无效的char'例外。 我尝试了很多变化,但从来没有让它工作。有没有人知道如何处理这个"挑战"? 谢谢你的时间! 干杯 托比