title: Iterate all item of ul and insert into database using ajax call
body: <p>I am new with jquery. I want to insert all the list items of ul. I tried the following but its not working can someone please guide me whats wrong with the code as i did "<strong><em>async:false"</em></strong> but it still not working</p>
  
  <pre><code>$('#sortable li').each(function () {  
              items += $(this).text();
              insertCustomBCFields($(this).text(), plu);
          });
  </code></pre>
  
  <p>And insertCustomBCFields ftn is below</p>
  
  <pre><code>function insertCustomBCFields(field, plu) {
          alert(field + plu);
          $.ajax({
              type: "POST",
              url: 'ProductDefinition.aspx/insertBCCustomFields',
              data: "{'field':'" + field + "', 'plu':'" + plu + "'}",
              contentType: "application/json; charset=utf-8",
              async: false,
              dataType: "json",
              success: function (data) {
                  alert("Success");
              },
              failure: function (response) {
                  alert("Insert Failed!");
              }
          });
      }
  </code></pre>