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
0 Sergey Alexandrovich Kryukov 574
1 OriginalGriff 373
2 Damith Weerasinghe 355
3 thatraja 350
4 Abhinav S 230
0 Sergey Alexandrovich Kryukov 10,639
1 OriginalGriff 6,658
2 Peter Leow 4,735
3 Abhinav S 3,813
4 Maciej Los 3,565

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