Advertisement
Guest User

Untitled

a guest
Sep 5th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function customer_details()
  2. {
  3. $cus_id = $this->input->get('cus_id');
  4. $this->db->select('CustomerName,Phone,CompanyName,CustomerType,CallNotes,CallStatus,CustomerEmail,EntryDate,LastCalled');
  5. $this->db->from('agent_cdr');
  6. $this->db->where('id',"$cus_id");
  7. $query = $this->db->get();
  8. $ret = $query->row();
  9. echo json_encode($ret);
  10.  
  11. }
  12.  
  13. var response = jQuery.trim(xmlhttp.responseText);
  14. //console.log(response);
  15. var arr = JSON.parse(response);
  16. var arr = $.map(arr, function(el) { return el; })
  17. console.log(arr) ;
  18. var output="<ul>";
  19. $.each( arr, function( key, value ) {
  20. //alert( key + ": " + value );
  21. if((value.length)>1){
  22. output+="<li>" + value + "</li>";
  23. }
  24. });
  25. output+="</ul>";
  26. $('#cus_details').html(output);
  27.  
  28. 0: "Nitin Tomar"
  29. 1: "7010010001"
  30. 2: "Infosys"
  31. 3: "VIMP"
  32. 4: "closed"
  33. 5: "ntomar@gmail.com"
  34.  
  35. CallNotes: null
  36. CallStatus: "closed"
  37. CompanyName: "Infosys"
  38. CustomerEmail: "ntomar@gmail.com"
  39. CustomerName: "Nitin Tomar"
  40. CustomerType: "VIMP"
  41. EntryDate: "2015-09-05 17:18:53"
  42. LastCalled: null
  43. Phone: "7010010001"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement