By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,567 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,567 IT Pros & Developers. It's quick & easy.

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

P: 200
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
Jan 6 '10 #1

✓ answered by acoder

Try putting the code in its own file and including it.

Share this Question
Share on Google+
2 Replies

P: 200
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"?>

Expand|Select|Wrap|Line Numbers
  2. SCRIPT TYPE='text/javascript'>
  3. function SaveListItem()
  4. {
  5. var soapRequest = '<?xml version="1.0" encoding="utf-8"?>' +
  6. '<soap12:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap12="">' +
  7. '<soap12:Body>'+
  8. '<UpdateListItems xmlns="">'+
  9. '<listName>{FE9526F8-1B17-40E5-9A91-56DCE868CF81}</listName>'+
  10. '<updates>'+
  11. '<Batch OnError="Continue">'+
  12. '<Method ID="1" Cmd="New">'+
  13. '<Field Name="ID">New</Field>'+
  14. '<Field Name="Title">TestData</Field>'+
  15. '</Method>'+
  16. '</Batch>'+
  17. '</updates>'+
  18. '</UpdateListItems>'+
  19. '</soap12:Body>'+
  20. '</soap12:Envelope>';
  21. xmlHttp=new XMLHttpRequest();
  22.'post', 'http://srv08-za143/workspace/departments/masterfiles/Vendor%20Takeon/_vti_bin/Lists.asmx', true);
  23. xmlHttp.setRequestHeader('Content-Type','application/soap+xml; charset=utf-8');
  24. xmlHttp.send(soapRequest);
  25. </SCRIPT>
Jan 6 '10 #2

Expert Mod 15k+
P: 16,027
Try putting the code in its own file and including it.
Jan 8 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.