Sunday, March 23, 2014

SharePoint 2013 JavaScript Client Object Model Example

In this post we will discuss about an example in JavaScript example in SharePoint 2013.

Also you can check out:

- Shredded Storage new feature in SharePoint 2013

- Steps to create App Catalog site in SharePoint 2013

- Browsers supported in SharePoint 2013

In this example we will try to get the site collection url using JavaScript client object model.

var siteCollection;

var ctx = new SP.ClientContext.get_current();

siteCollection = ctx.get_site();


ctx.executeQueryAsync(success, failure);

function success() {

var url = siteCollection.get_url();


function failure() {



Twitter Delicious Facebook Digg Favorites More