The current script creates a table showing all Items from the list.
e.g. In my list there is a column named 'Category' with 'Cats' and 'Dogs'.
What I want to achieve is to FILTER and ONLY display 'Category' with 'Cats' in the HTML table.
How do i achieve this?
<SCRIPT type=text/javascript> get() ;function get() { var method = "GetListItems";
var webURL = $().SPServices.SPGetCurrentSite() ;
var list = "Core Libraries";
var fieldsToRead = "<ViewFields>"+"<FieldRef Name='Name' />" +"</ViewFields>";
var query = "<Query><OrderBy><FieldRef Name='ID' Ascending='False' /></OrderBy></Query>";
$().SPServices
({ operation: method, async: false, webURL: webURL, listName: list,
CAMLViewFields: "<ViewFields Properties='True' />",
CAMLQuery: query, completefunc: function (xData, Status)
{ $(xData.responseXML).SPFilterNode("z:row").each(function()
{ var title = $(this).attr("ows_Title");
var update = $(this).attr("ows_Update");
var date = $(this).attr("ows_Date");
$("#myDataTable").append("<tr align='middle'>" +
"<td align='left'>"+date+"</td>" + "<td align='left'>"+update+"</td>" + "</tr>");
}); } }); };
</script>