Category Archives SharePoint

Here is a lightbox developed by SharePoint and Knockout integration.

Final Output

SharePoint Knockout Lightbox
SharePoint Knockout Lightbox

HTML Markup

Gallery View Model

I have used JavaScript modular approach. Here is Gallery View Model JavaScript code snippet

ServerHub Module

I have placed all my server side calls in separate JavaScript file called serverhub.js.   In serverhub.js I am making calls to reterive data from SharePoint and pass this data back to my view model.

This is a basic example of using knockout with SharePoint. Code is self explanatory but if you have any question then please do get in touch. Happy knocking out. Read more

First of all, You must give the app read access to the Host Site Collection through the App Manifest file.


When the App first launches, SharePoint provides three values in the query string named: SPHostUrl, SPAppWebUrl and SPLanguage.

When the correct permission requests are set, we can use the SPHostUrl and SPAppWebUrl to connect to the SharePoint web services. This code snippet below gets the query parameters and loads the necessary SharePoint JavaScript files.

After the SharePoint JavaScript files are loaded, the appweburl is needed to create a context. With this context we can create a appContextSite to get to the host web.

For those of you who are REST purists, an example of doing the same thing is on the this Technet article Access SharePoint 2013 data from add-ins using the cross-domain library . But in my app, I’m using the Client Object Model and there really weren’t any examples out there that showed how to do this using CSOM. Read more

How to use callback method with SharePoint Rest API

Sometimes you need to have full control over data processing while running executing programs. For example one of your next process might depend on current retrieved data from the SharePoint list.

As i said in my previous posts. I really comfortable using JavaScript modular pattern. so i am going to stick with that. Read more

Update SharePoint list using Promises & Deferred method

As promise! Here is an article about using promises and deferreds method with SharePoint 2013 Javascript Object Model


One of the common problem with using the SharePoint client object model is the asynchronous nature of the object property calls.  When you call ExeutesQueryAsync in Javascript Object Model, It execute the model you declared and then continue immediately! Read more