I have the following code to return the libraries of my project in SharePoint:
function retornarLista() {
collList = website.get_lists();
context.load(collList);//, 'Include(TemplateType==109)'
context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
}
function onQuerySucceeded() {
var listInfo = '';
var listEnumerator = collList.getEnumerator();
while (listEnumerator.moveNext()) {
var oList = listEnumerator.get_current();
listInfo += 'Title: ' + oList.get_title() +
' ID: ' + oList.get_id().toString() + '\n';
$("#biblioteca").append("<option value='" + oList.get_id().toString() + "'>" + oList.get_title() + "</option>");
}
}
function onQueryFailed() {
alert("Failed");
}
I would like to return only Image Libraries to transfer to a dropdown
of select
, but I have not been able to, can anyone help?