473,408 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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

200 100+
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.

2 4379
ismailc
200 100+
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
  1.  
  2. SCRIPT TYPE='text/javascript'>
  3. function SaveListItem()
  4. {
  5. var soapRequest = '<?xml version="1.0" encoding="utf-8"?>' +
  6. '<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">' +
  7. '<soap12:Body>'+
  8. '<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+
  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. xmlHttp.open('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>
  26.  
Jan 6 '10 #2
acoder
16,027 Expert Mod 8TB
Try putting the code in its own file and including it.
Jan 8 '10 #3

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

Similar topics

0
by: David | last post by:
I have developed an ASP.NET web site that is mostly populated by data in Windows Sharepoint Services. It works fine once I log in, but in spite of doing everything I can find, I can't get it to...
4
by: dave | last post by:
if i created a web part in vs.net like http://www.devx.com/dotnet/Article/17518/0/page/2 is it possible to use the web part in both the sharepoint services environment and the sharepoint portal...
3
by: Brent | last post by:
Hi, Recently, we installed Sharepoint Services on our test server (Server 2003) to try it out. I made a new web for my regular aspx pages. My problem is that now whenever I try to access my old...
0
by: BorisDotNet | last post by:
Hi there I think I've seen an article recently on how to use Automatic Windows Update Services to distribute and apply updates to .NET applications. But now when I need it I can't find the...
6
by: Michael S | last post by:
Not sure if I'm posting in the right group but here goes. I am getting the following error when trying to browse to an .aspx page which I have set up in a virtual directory under the default...
1
by: Peter S. | last post by:
There are some files in a Sharepoint document library that I need to access from a C# Webcontrol. The problem is that when the user runs the ASP.NET webpage they will be coming in with a...
3
by: SMH | last post by:
Normally an SVG document is loaded/parsed/interpreted inside an HTML document using an 'object' (or 'embed') element, although there are supposedly other ways too. The problem is, the SVG document...
0
by: Alexander Vasilevsky | last post by:
Hi! What differ *.stp and *.wsp Windows Sharepoint Services files? -- http://www.alvas.net - Audio tools for C# and VB.Net developers
0
by: Zamdrist | last post by:
I've copied a project from a non-sharepoint IIS server to a sharepoint services 3.0 IIS server, in a virtual directory similar to how the source project was layed out as. When I copy it over it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.