0
我只是進入Sharepoint的SPServices,似乎它可能是我的需要的業務,即編程方式更新列表中的值。尋找一個非常簡單的示例UpdateListItems的SP服務與SharePoint 2007
作爲一個測試,我嘗試了下面的代碼來更新名爲jQueryList的列標題列,其中有一行(ID = 1)。
<script src="..../js/jquery.SPServices-0.7.1a.min.js" type="text/javascript"></script>
<script src="..../js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(#inhere).html(waitMessage).SPServices({
operation: "UpdateListItems",
listName: jQueryList,
ID: 1,
valuepairs: [["Title", "eggs"]],
completefunc: function (xData, Status) {
var out = $().SPServices.SPDebugXMLHttpResult({
node: xData.responseXML,
outputId: inhere
});
$(#inhere).html("").append("<b>This is the output from the UpdateListItems operation:</b>" + out);
$(#inhere).append("<b>Refresh to see the change in the list above.</b>");
}
});
}
</script>
<div id="inhere">
</div>
我已經把CEWP放在我的列表jQueryList的底部,但它並沒有更新我行的值。 關於這個問題的全新手風格道歉,但如果任何人有任何指針,我會很感激。 注意:我在默認視圖中顯示ID列的ID值。
最好的問候/科爾姆
嗯,listName應該用引號括起來,即「jQueryList」 – carbontracking