Unable to execute code to find duplicate value in SharePoint list using jquery

Oct 19, 2011 at 7:27 AM

Hi to all,

              This is Siddiqali working on SharePoint 2010.I am working on SharePoint  with jquery,And i am very new to juery.Below is the code written to found the duplicate value existed in list or not.Can any one quote me what is wrong in code 

 

  $('#button1").click(function()

{

   i=$("#textbox1").val();

      var query="<Query></Query>";

          $().SPServices({

       operation:"GetListItems",listName="Test",async:false,

              CAMLQery:query,

                 (completefunc:function(xData,Status)

                 {

                    $(xData.responseXML).find("\\z:row").each(function()

                     {

                         var u= "<Field Name='ID'></Field>";

                        if(i==u)

                        {

                        alert("Found");

                        }

 

                     });   

                  }

            })

 

 

Thanks

MOHAMMAD SIDDIQALI.

Coordinator
Oct 23, 2011 at 4:06 AM

Mohammed:

You've got multiple syntax and spelling errors in your script above. I think you simply need to do some debugging. Also, check the docs again and look at the examples for better syntax to use.

M.