Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data: data,
- dataType: 'json',
- success: function(json) {
- if (json !== null) {
- var id = json[0]; //get id
- var employee = json[1]; //get employee
- var date = json[2]; //get employee
- var companyName = json[3]; //get company
- var notes = json[4]; //get company
- var companyPhone = json[5]; //get company
- var contact = json[6]; //get company
- var fulfilledStatus = json[7];
- for (
- var i = 0;
- i < json.length;
- i++)
- {
- var item = json[i];
- if (json === null) {
- alert("No ID Found");
- }
- if (item.fulfilledStatus == "1") {
- var checked = "style='display:none'";
- }
- else {
- var checked = "";
- };
- $('#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