I'm trying to query http://rootsite/Pages from a subiste
//var clientContext = new SP.ClientContext("/");
var clientContext = new SP.ClientContext(_spPageContextInfo.siteServerRelativeUrl);
//alert(_spPageContextInfo.siteServerRelativeUrl);
var web = clientContext.get_web();
var list = web.get_lists().getByTitle("Pages");
I'm getting error request failed: Cannot complete this action.Is there anything i'm oing wrong here. If i run the code in the root site it works.
Thanks in advance