This project has moved and is read-only. For the latest updates, please go here.

Not Getting Response text at all

Nov 10, 2010 at 6:27 PM

Hi Marc,

First of all I'ld like to thank you for a very cool library, its been very useful.

I am using it with SharePoint 2010 with good results and for the most part its been fairly painless.


I have some code that is not returning any response text, its wierd.

this is waht I have.

function UpdateSharePoint(id, title, bulletin)
	alert('made it to UpdateSharePoint');
		alert('id was zero');
		alert(id + "\n" + title + "\n" + bulletin);
		//		batchCmd: 'Update',
		operation: 'UpdateListItems',
		webURL: 'http://ludwig',
		async: false,
		batchCmd: 'Update',
		listName: 'Bulletins',
		ID: id ,
		valuepairs: [['Title', title], ['Body', bulletin]],
		debug: true,
		completefunc: function(xData, Status) {
			if(Status != 'success'){
			alert('There was a problem updating the Sharepoint Server' + Status);}



Now I CAN Get it to send a response back by changing WebURL to WebUrl and the status IS error currently so that is coming back ok.

Not haveing the response text or xml to look at is making this troubleshooting session pretty tough...hoping some one out there can shed some light or point me in the right direction.



David Moody

Nov 10, 2010 at 8:32 PM

Ok I think I got this,

I was trying to put HTML in the Body of an announcement. I THINK that was causeing a problem. Why it would cause NO response I don't know so it looks like that I will need to strip all of the HTML out before I update the items.


Thanks :-)

Nov 10, 2010 at 9:21 PM

When you get stuck like this, try stripping things back as far as possible. Update only the Title, hard-wire the ID, etc. untill you get a working version, then take baby steps forward again.

I don't *think* that the HMTL for the Body should have been a problem unless you are disallowing it in the list settings.



Nov 10, 2010 at 9:40 PM

I really need to able to update with html. I don't see a setting that would disallow it though.

Nov 10, 2010 at 9:46 PM

BTW, the option is webURL and capitalization matters. I just noticed that I have some mistakes in the docs on this and I'm going to fix them right now!


Nov 11, 2010 at 2:41 PM

So it turns out that whaen your updating EnhancedHTML fields in sharepoint 2010, with html, using webservices you have to encode the HTML first. I found some javascript already written here 

Once the html is encoded it works a treat :-)




Nov 12, 2010 at 3:02 AM

Good catch.