TypeError: i is undefined error ?

TypeError: i is undefined error ?

ugyenugyen Posts: 1Questions: 1Answers: 0

Hi,
I am new to datatables and implementing with server side processing with my laravel 5 app. But when i return my ajax data and display it, i am getting a "I is undefined error "

//***************** My HTML*********************//

si.no mother_mch child_mch mother_name mother_dob mother_cidno mother_village mother_gewog mother_dzo

//***************** My JS*********************//

var oTable;

$(document).ready(function() {

oTable = $('#clients').dataTable( {

    "sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
    "aoColumnDefs": [
    { "bSearchable": false, "bSortable": false, "aTargets": [ 0 ] }
    ],
    "sPaginationType": "bootstrap",
    "bProcessing": true,
    "bServerSide" : true,
    "sAjaxSource": "{{ url('admin/clients/data') }}",

})

});

//***************** My ajax*********************//

{

"draw": ​0,
"recordsTotal": ​4,
"recordsFiltered": ​4,
"data": 

[

{

"id": ​3,
"mother_mch": "722875",
"child_mch": "833825",
"mother_cidno": ​901341,
"mother_name": "Elsie",
"mother_dob": "2011-10-26",
"mother_village": "Lake Garrett",
"mother_gewog": "Missouri",
"mother_dzo": "Georgia"

},
{

"id": ​4,
"mother_mch": "673782",
"child_mch": "314862",
"mother_cidno": ​583236,
"mother_name": "Amara",
"mother_dob": "2014-05-27",
"mother_village": "Tremouth",
"mother_gewog": "Virginia",
"mother_dzo": "Nevada"

},
{

"id": ​5,
"mother_mch": "286016",
"child_mch": "552136",
"mother_cidno": ​211494,
"mother_name": "Alice",
"mother_dob": "1989-07-07",
"mother_village": "Port Annaliseton",
"mother_gewog": "California",
"mother_dzo": "Mississippi"

},

{
    "id": ​6,
    "mother_mch": "127790",
    "child_mch": "822066",
    "mother_cidno": ​652489,
    "mother_name": "Vincenza",
    "mother_dob": "1978-11-17",
    "mother_village": "Caitlyntown",
    "mother_gewog": "Massachusetts",
    "mother_dzo": "Kansas"
}

],
"queries":
[

{

"query": "select count(*) as aggregate from (select '1' as `row_count` from `mothers` order by `mothers`.`id` asc, `mothers`.`mother_name` asc) count_row_table",
"bindings": [ ],
"time": ​0.6

},

{
    "query": "select `mothers`.`id`, `mothers`.`mother_mch`, `mothers`.`child_mch`, `mothers`.`mother_cidno`, `mothers`.`mother_name`, `mothers`.`mother_dob`, `mothers`.`mother_village`, `mothers`.`mother_gewog`, `mothers`.`mother_dzo` from `mothers` order by `mothers`.`id` asc, `mothers`.`mother_name` asc",
    "bindings": [ ],
    "time": ​0.63
}

],
"input":

{
    "sEcho": "1",
    "iColumns": "9",
    "sColumns": "",
    "iDisplayStart": "0",
    "iDisplayLength": "10",
    "mDataProp_0": "0",
    "mDataProp_1": "1",
    "mDataProp_2": "2",
    "mDataProp_3": "3",
    "mDataProp_4": "4",
    "mDataProp_5": "5",
    "mDataProp_6": "6",
    "mDataProp_7": "7",
    "mDataProp_8": "8",
    "sSearch": "",
    "bRegex": "false",
    "sSearch_0": "",
    "bRegex_0": "false",
    "bSearchable_0": "false",
    "sSearch_1": "",
    "bRegex_1": "false",
    "bSearchable_1": "true",
    "sSearch_2": "",
    "bRegex_2": "false",
    "bSearchable_2": "true",
    "sSearch_3": "",
    "bRegex_3": "false",
    "bSearchable_3": "true",
    "sSearch_4": "",
    "bRegex_4": "false",
    "bSearchable_4": "true",
    "sSearch_5": "",
    "bRegex_5": "false",
    "bSearchable_5": "true",
    "sSearch_6": "",
    "bRegex_6": "false",
    "bSearchable_6": "true",
    "sSearch_7": "",
    "bRegex_7": "false",
    "bSearchable_7": "true",
    "sSearch_8": "",
    "bRegex_8": "false",
    "bSearchable_8": "true",
    "iSortCol_0": "0",
    "sSortDir_0": "asc",
    "iSortingCols": "1",
    "bSortable_0": "false",
    "bSortable_1": "true",
    "bSortable_2": "true",
    "bSortable_3": "true",
    "bSortable_4": "true",
    "bSortable_5": "true",
    "bSortable_6": "true",
    "bSortable_7": "true",
    "bSortable_8": "true",
    "_": "1451969707669"
}

}

//***************** *********************//

Thank you in advance.
Ugyen.

Answers

  • allanallan Posts: 64,052Questions: 1Answers: 10,559 Site admin

    Please link to a test case showing the issue.

    Allan

This discussion has been closed.