Friday, 12 September 2014

"Unexpected response data from server." new SP.ClientContext.get_current();



I don't know i am getting Unexpected response data from server error when i use new SP.ClientContext.get_current();
But it was working earlier...
Now i am using this..


  var burl= window.location.href;    //I got url as:  http://MydomainName/teams/MySiteCollectionName/Welcome
      var Url= burl.substr(0, burl.indexOf('/Welcome/'));                
        var objctx = new SP.ClientContext(Url);