Why is my table contain no row when it suppose to have 3 rows.
Why is my table contain no row when it suppose to have 3 rows.
I know my table should have 3 row but table only display message "processing". http://debug.datatables.net/oyoyog,
here is what ajax return
[{"name":"Autumn M. Andy;41","email":" ","phone":" ","city":"Phoenix","state":"Arizona","skill":"Customer Service"},{"name":"Y. Nelson Tom;518","email":" ","phone":" ","city":"Phoenix","state":"Arizona","skill":"Customer Service"},{"name":"shirrey Y. Wang;52","email":" ","phone":" ","city":"Phoenix","state":"Arizona","skill":"Customer Service"}]
Here is code in question
//setup and populate table function get_selected_people() { $.ajax({ url: "ajax_search_by_skill_city_state", type: "POST", data: { 'skill_id' : $("#skill_select option:selected").val(), 'city_id' : $("#city_select option:selected").val(), 'state_id' : $("#state_select option:selected").val() }, dataType: "json", success: function(data){ //alert(data); //var opts = $.parseJSON(data); if(data) { //$("body").html(data); aDataSet = data; } } }); if (oTable) { oTable.fnDestroy(); } $(document).ready(function() { $('#tabContent').html( '
Answers
I made a mistake. datatable version I am using is 1.9.0 as someone pointed out in another question I have. in 1.9.0 I should use mDataProp not mData nor data.
Thank you very much for reviewing my question.