I am currently trying to determine the length of a list that is located on my SharePoint site. I am using a Caml query to retrieve the items in my list, but I can not figure out how to get the length of the result. I am using the Client Object Model and javascript / Ajax / jquery etc...
var context = new SP.ClientContext.get_current();
var query = new SP.CamlQuery();
var currentweb = context.get_web();
query.set_viewXml('<View>' +
'<Query>'+
'<Where>'+
'<IsNotNull>' +
'<FieldRef Name="ID" />'+
'</IsNotNull>' +
'</Where>'+
'</Query>'+
'<ViewFields>'+
'<FieldRef Name="Name"/>'+
'</ViewFields>'+
'</View>');
var colList= currentweb.get_lists().getByTitle("MyList");
this.docList= colList.getItems(query);
context.load(this.docList);
context.ExecuteQuery();
When the code runs context.ExecuteQuery() the console prints out this.
context.ExecuteQuery is not a function