Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: sharepoint2010
Hi experter,
i'm newbie in Sharepoint and have Problem by getting lists and subsites using siteid
with javascript:
so topsite->subsite1,subsite2
I have guid at subsite and would like to get all subsites from there.
My JavascriptCode:
currentcontext = new SP.ClientContext.get_current();// ('/sites/subsite1'); 
//    currentweb = currentcontext.get_web();
    site = currentcontext.get_site();
    web = site.openWebById(subsite11ID);('/sites/subsite1/Subsite11'); 
//this.subsites = currentweb.get_webs();
    //this.subsites = currentweb.get_lists();
    this.subsites = web.get_serverRelativeUrl();--> error hier. Function is not initialized
currentcontext.executeQueryAsync(Function.createDelegate(this, this.ExecuteOnSuccess),
Function.createDelegate(this, this.ExecuteOnFailure));
ClientContext accepts only relative Url
anyone can helps me? thanks a lot!
Posted 22-Nov-12 17:42pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
0 Shai Vashdi 1,448
1 Tadit Dash 270
2 OriginalGriff 223
3 Sergey Alexandrovich Kryukov 215
4 Peter Leow 180
0 Sergey Alexandrovich Kryukov 9,440
1 OriginalGriff 5,618
2 Peter Leow 4,280
3 Maciej Los 3,540
4 Abhinav S 3,363

Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid