This is my Code to get Lists by url:
this.getListsOfWebByUrl = function (Url) {
var clientContext = new SP.ClientContext(Url);
var oWebsite = clientContext.get_web();
var collList = oWebsite.get_lists();
clientContext.load(collList, 'Include(Title , Id)');
clientContext.executeQueryAsync(function onSucc(sender, args) {
var listInfo = new Object();
listInfo.title = new Array();
listInfo.id = new Array();
listInfo.url = new Array();
listInfoCollection = collList.getEnumerator();
while (listInfoCollection.moveNext()){
var oList = listInfoCollection.get_current();
listInfo.title.push(oList.get_title());
listInfo.id.push(oList.get_id()._m_guidString$p$0);
listInfo.url.push(collList.get_item('url'));
}
return listInfo;
}, function onFail(sender, args) {
alert("request Failed: " + args.get_message() + "\n" + args.get_stackTrace());
});
}
now I want to do the same but with webId instead of url , But I have no Idea on how to do this . Thanks for your help
Enumerate
andSPWeb