0
나는 다음과 같은 코드가 있습니다CAML/SPServices/JQuery와 오류
웹 페이지 오류 세부
사용자 에이전트 : IE에서 디버깅 할 때 나는 다음과 같은 오류가
function ViewItems() {
var liHtml = ''; //Set the variable to nothing
alert($('#categoryselect').val());
$().SPServices({
operation: "GetListItems",
async: false,
listName: "Items",
CAMLQuery: "<Where><Eq><FieldRef Name='Category'/><Value Type="Lookup">" + $('#categoryselect').val() + "</Value></Eq></Where>",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Image' /></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
liHtml = liHtml + "<h1>" + $(this).attr("ows_Title") + "</h2><br /> <img width=\"150px\" src=\"" + ($(this).attr("ows_Image")).split(", ")[0] + "\" /><br /> <a id=" + $(this).attr("ows_ID") + " class=\"addtobasket\">[Add To Basket]</a>";
});
$("#tasksUL").html(liHtml); //Fill the div with the liHTML
}
});
}
모질라/4.0 (MSIE 8.0, Windows NT 6.1, Trident/4.0, SLCC2, .NET CLR 2.0.50727, .NET CLR 3.5.30729, .NET CLR 3.0.30729, Media Center PC 6.0, .NET4.0C, .NET4.0E ; InfoPath.3) 타임 스탬프 : 2014 년 3 월 19 일 수요일 15:27:28 UTC
Message: Expected '}'
Line: 74
Char: 77
Code: 0
URI: MY SP Site
Message: Could not complete the operation due to error 80020101.
Line: 2
Char: 2568
Code: 0
URI: /Assets/jquery.js
라인 (74)은 다음과 같습니다 나는 값 유형을 지정하지 않으면
async: false,
나는 오류가 발생하지 않습니다, 그러나 쿼리가 0 결과를 반환합니다.
감사합니다, 그것은 바보 같은 것을 알았습니다! –
바보 같지 않습니다. 때로는 두 번째 쌍이 필요합니다. 특히 눈을 오랫동안 보면서. :) –