Advertisement
bowenac

Untitled

Apr 22nd, 2014
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. data: data,
  2. dataType: 'json',
  3. success: function(json) {
  4. var id = json[0]; //get id
  5. var employee = json[1]; //get employee
  6. var date = json[2]; //get employee
  7. var companyName = json[3]; //get company
  8. var notes = json[4]; //get company
  9. var companyPhone = json[5]; //get company
  10. var contact = json[6]; //get company
  11. var fulfilledStatus = json[7];
  12.  
  13. for (
  14. var i = 0;
  15. i < json.length;
  16. i++)
  17. {
  18. var item = json[i];
  19.  
  20. if (json === null) {
  21. alert("No ID Found");
  22. }
  23.  
  24. if (item.fulfilledStatus == "1") {
  25. var checked = "style='display:none'";
  26. }
  27. else {
  28. var checked = "";
  29. };
  30.  
  31. $('#output').append("<div class='lead'><input type='hidden' class='id' name='leadId[" + item.id + "]' value=" + item.id + " /><p class='id' id='id' value=" + item.id + ">Lead ID: " + item.id + "</p><p> Date: " + item.date + "</p><p> Company Name: " + item.companyName + "</p><p>Contact: " + item.contact + "</p><p>Phone: " + item.companyPhone + "</p><p>Lead info: " + item.notes + "</p><label>Fulfilled</label><input type='checkbox' name='status[" + item.id + "]' id='status' class='status' value=" + item.fulfilledStatus + " " + checked + " /></div>");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement