Hi experter,
i'm newbie in Sharepoint and have Problem by getting lists and subsites using siteid
with javascript:
so topsite->subsite1,subsite2
subsite1->subsite11,subsite12,subsite13
subsite2->subsite21,subsite22...
I have guid at subsite and would like to get all subsites from there.
My JavascriptCode:
currentcontext = new SP.ClientContext.get_current();
site = currentcontext.get_site();
currentcontext.load(site);
web = site.openWebById(subsite11ID);('/sites/subsite1/Subsite11');
currentcontext.load(web);
this.subsites = web.get_serverRelativeUrl();--> error hier. Function is not initialized
currentcontext.load(this.subsites);
currentcontext.executeQueryAsync(Function.createDelegate(this, this.ExecuteOnSuccess),
Function.createDelegate(this, this.ExecuteOnFailure));
ClientContext accepts only relative Url
anyone can helps me? thanks a lot!