Created
May 31, 2013 17:05
-
-
Save RyanHirsch/5686396 to your computer and use it in GitHub Desktop.
SharePoint Javascript CSOM to get site and web objects of the current site
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ctx = SP.ClientContext.get_current(); | |
var web = ctx.get_web(); | |
var site = ctx.get_site(); | |
ctx.load(site); | |
ctx.load(web); | |
ctx.executeQueryAsync(function() { | |
console.log('success'); | |
}, function() { | |
console.log('error'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment