hi guys , i use Datatable 1.9 inside of codeigniter framework !
well u know everything works great when i use static data s ! but in ajax way i have a problem
here is my initializing datatable and Json data !
json data :
and here is my view code :
in this situation i got this error :
and when i remove "sDom": '<"H"fl>t<"F"ip>' everything works great again but my style goes stupid ! please help , i dont know what to do :( !
well u know everything works great when i use static data s ! but in ajax way i have a problem
here is my initializing datatable and Json data !
oTable = $('.Reza').dataTable({
"bJQueryUI": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "http://localhost/neuron/index.php/company/list_all",
"sServerMethod": "POST",
"sDom": '<"H"fl>t<"F"ip>'
});
json data :
{
"sEcho":0,
"iTotalRecords":8,
"iTotalDisplayRecords":8,
"aaData":[
[
"Reza Marandi",
"administrator",
"110",
"Iran",
"Mashhad"
],
[
"Reza MM",
"mar@mar.ir",
"110",
"United Kingdom",
"sdfgsdg"
],
[
"Reza MM",
"mar@mar.ir",
"110",
"United Kingdom",
"sdfgsdg"
],
[
"Reza Joooon",
"reza@marandi.ir",
"m110",
"Bouvet Island",
"asdasd"
],
[
"Reza Marandi",
"marandi@marandi.ir",
"0",
"",
""
],
[
"Reza Jooo222222222on",
"reza@marandi.ir2",
"0",
"",
""
],
[
"Reza Jooo222222222on",
"reza@marandi.ir2",
"0",
"",
""
],
[
"Reza Masdasdasdasd",
"mar@mar.ir2",
"0",
"",
""
]
],
"sColumns":"Name,UserName,Password,Country,City"
}
and here is my view code :
<!-- Table with always visible toolbar -->
<div class="widget">
<div class="whead"><h6>Companies Users</h6><div class="clear"></div></div>
<div id="dyn" class="hiddenpars">
<a class="tOptions" title="Options"><img src="<?php echo base_url(); ?>/assets/images/icons/options" alt="" /></a>
<table cellpadding="0" cellspacing="0" border="0" class="Reza" id="dynamic">
<thead>
<tr>
<th>Name ( Username )<span class="sorting" style="display: block;"></span></th>
<th>Groups Name</th>
<th>City</th>
<th>Address</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="clear"></div>
</div>
<!-- / Table with always visible toolbar -->
in this situation i got this error :
Uncaught TypeError: Cannot read property 'length' of undefined
and when i remove "sDom": '<"H"fl>t<"F"ip>' everything works great again but my style goes stupid ! please help , i dont know what to do :( !