View Full Version : Update a Sharepoint List (Document Library)Folders using Web Services with Javascript
ismailc
01-06-2010, 10:03 AM
Good day, I need help.
I would like to Update a Sharepoint List (Document Library) Folders using Web Services with Javascript.
I have searched on Goggle but nothing that updates a document Library using UpdateListsItem method & with it being a clientside i need to pass NT Credentials to the List
Please provide code as I have to get this going & have no clue.
Please Assist
ismailc
01-06-2010, 11:11 AM
I got some example but struggling
I'm adding the javascript within my xslt file
I now get the error Uexpected XML delecration becuase xslt file alrady has xslt decleration <?xml version="1.0"?>
SCRIPT TYPE='text/javascript'>
function SaveListItem()
{
var soapRequest = '<?xml version="1.0" encoding="utf-8"?>' +
'<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">' +
'<soap12:Body>'+
'<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+
'<listName>{FE9526F8-1B17-40E5-9A91-56DCE868CF81}</listName>'+
'<updates>'+
'<Batch OnError="Continue">'+
'<Method ID="1" Cmd="New">'+
'<Field Name="ID">New</Field>'+
'<Field Name="Title">TestData</Field>'+
'</Method>'+
'</Batch>'+
'</updates>'+
'</UpdateListItems>'+
'</soap12:Body>'+
'</soap12:Envelope>';
xmlHttp=new XMLHttpRequest();
xmlHttp.open('post', 'http://srv08-za143/workspace/departments/masterfiles/Vendor%20Takeon/_vti_bin/Lists.asmx', true);
xmlHttp.setRequestHeader('Content-Type','application/soap+xml; charset=utf-8');
xmlHttp.send(soapRequest);
}
</SCRIPT>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.