Results 1 to 2 of 2

Thread: Update a Sharepoint List (Document Library)Folders using Web Services with Javascript

  1. #1
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Update a Sharepoint List (Document Library)Folders using Web Services with Javascript

    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

  2. #2
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question

    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"?>

    Code:
    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>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •