Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function customer_details()
- {
- $cus_id = $this->input->get('cus_id');
- $this->db->select('CustomerName,Phone,CompanyName,CustomerType,CallNotes,CallStatus,CustomerEmail,EntryDate,LastCalled');
- $this->db->from('agent_cdr');
- $this->db->where('id',"$cus_id");
- $query = $this->db->get();
- $ret = $query->row();
- echo json_encode($ret);
- }
- var response = jQuery.trim(xmlhttp.responseText);
- //console.log(response);
- var arr = JSON.parse(response);
- var arr = $.map(arr, function(el) { return el; })
- console.log(arr) ;
- var output="<ul>";
- $.each( arr, function( key, value ) {
- //alert( key + ": " + value );
- if((value.length)>1){
- output+="<li>" + value + "</li>";
- }
- });
- output+="</ul>";
- $('#cus_details').html(output);
- 0: "Nitin Tomar"
- 1: "7010010001"
- 2: "Infosys"
- 3: "VIMP"
- 4: "closed"
- 5: "ntomar@gmail.com"
- CallNotes: null
- CallStatus: "closed"
- CompanyName: "Infosys"
- CustomerEmail: "ntomar@gmail.com"
- CustomerName: "Nitin Tomar"
- CustomerType: "VIMP"
- EntryDate: "2015-09-05 17:18:53"
- LastCalled: null
- Phone: "7010010001"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement