Click on this icon to open the XML page.Tom Van Gaever - Blog
Search:   

Use Javascript to connect SharePoint Webservice in Content editor webpart 
Monday, November 24, 2008, 17:23 - SharePoint
Posted by Administrator

Darren Johnstone created an interesting JavaScript API for SharePoint.

The following examples illustrate the use of the JavaScript API for SharePoint and Office Live. These examples are intended to demonstrate the core uses of the API for solution developers.
* Get the full definition of a list
* Get the full definition of a list and associated view
* Get the basic detail of all lists in a site
* Get the GUID of a list from it’s name
* Querying a list using the Lists web service
* Querying a list using the List Data Retrieval Service
* Create a new list from an existing list template
* Delete a list
* Create one or more new list items
* Update one or more list items
* Delete one or more list items
* Create a new folder within a list
* Performing a keyword search
* Performing a full text search


The API contains 23 JavaScript files.

Let me show you how easy we can create a call to Lists.asmx web service and retrieve all the items:

var lists = new SPAPI_Lists('http://mossserver')
var items = lists.getListItems('Tasks');
if (items.status == 200)
{
var rows = items.responseXML.getElementsByTagName('z:row');
//START DOING JS MAGIC
}

If you're developing custom web parts and you're favorite web part is the content editor web part. Go check out this library.

More information can be found at the related link section of this post.

4 comments ( 75 views )   |  permalink   |  related link   |   ( 3 / 722 )

<<First <Back | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Next> Last>>