jQuery and Sharepoint web services - add a list item

0 comments
This is a very basic tutorial in how to add list items using SharePoint and jQuery. Some prerequisites to understand what is happening. The main items to observe are:
  • xhr.setRequestHeader that you can get from the web services page (see bellow)
  • in the SharePoint' list you need two columns Title and Description
  • the browser alert window will return some information that you could remove after testing
  • after posting the information in the list it will run the processResult function where you can do some fancy user feedback

Html with the fields to be edited by the user
Title: 
Description: 

In the SharePoint web services description you can extract the value for the xhr.setRequestHeader variable invoking /_vti_bin/lists.asmx?op=UpdateListItems, here is an example:
POST /_vti_bin/lists.asmx HTTP/1.1
Host: www.ausinnovation.org
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems"





string

schemaxml



Extreme programming

0 comments

Flow charts

0 comments

Bug x Feature

0 comments

Removing html tags from xml with xslt (aka string html tags with xslt)

0 comments
The technique to remove tags from xml with xslt is very creative. If you have a xml document that is like:

Lorem ipsum dolor sit amet <b> consectetur adipiscing elit </b>. Suspendisse ac ipsum eu orci accumsan dignissim. Fusce fringilla.

The script will store in the variable the items before the "<" and send to recursion the items after the ">".


 
  
   
  
 
 
 



 
 
  
   
   
   
   
    
    
   
  
  
   
  
 

Thanks to KaushaL.NET for this xslt code