Introduction

This blog is mainly focused on SharePoint
I will use this to store and share all the tips and tricks about SharePoint and the related products
List of all posts

Testing if a property of an object is undefined


Topic Testing if a property of an object is undefined
Outputsample code

Step Description
1
     if (SessionJSON.Result == undefined) { SessionJSON.Result = null;}

Assynchronous functions in javascript for Metro Application


Topic Assynchronous functions in javascript for Metro Application
OutputA sample pair of functions

Step Description
1 Create the assynchronous function that you will call later
    function assynchrone_function() {
        return new WinJS.Promise(function (Jsonoutput) {
            var entrainementJSON;
   ...
   do the assync stuff here
   ...
            Jsonoutput(entrainementJSON);
        })

    }
2 Call your function, waiting that it's done before using the return
  var promise = assynchrone_function();
    promise.then(function (data) {
 ...
 use the data
 ...
    });

by Category