What i need is to find all list items with the same title using SPServices. I've made a CAML query from TextBox1 but have no idea what to do next. My question is: how do I change this code to accomplish my goal?
<script language="javascript" type="text/javascript">
function GetTitleMatch()
{
var Tit = $("#TextBox1").val();
$().SPServices({
operation:"GetListItems",
listName:"CustomList",
async:false,
CAMLViewFields: "<ViewFields>"+
"<FieldRef Name='Title'/>"+
"<ViewFields>",
CAMLQuery:"<Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + Tit + "</Value></Eq></Where></Query>",
completefunc:function(xData,status)
{
alert($(xData.responseXML).find('[nodeName="z\\:row"]').length);
}
});
}
</script>
<a href="#" onclick="javascript:GetTitleMatch();">click</a>