**Update:**

> 
> I finally found the solution for this problem. If you face the same
>  problem as mine, you can try visit this [link](http://codeigniter.com/forums/viewthread/160896/P340/#1013662) 
> 
> 
> 

I am having problem when want to integrate [Jquery DataTables](http://datatables.net) with [CodeIgniter Ignited-Datatables](https://github.com/IgnitedDatatables/Ignited-Datatables) library

When I use the default DataTables **sServerMethod** property which is "GET", I got the json response with data from my php. However since CodeIgniter use post, I stuck at loading server data although the function return me correct json output.

![enter image description here](https://i.stack.imgur.com/Q3WEH.png)

So I follow this [guide](http://gvlatko.com/2012/datables-stuck-on-server-side-processing-solution-for-codeigniter-with-ignitedtables/)  to change the **sServerMethod** to "POST". Now I dont stuck at loading server data, but I dont get the data that I need.

JSON response using **sServerMethod** GET (get correct json, but stuck at loading server data as in the image)

```
{
"sEcho": 0,
"iTotalRecords": 10,
"iTotalDisplayRecords": 10,
"aaData": [
    [
        "Munauwar",
        "Syed",
        "Mr",
        "6012345678",
        "0000-00-00",
        "basikal"
    ],        
    [
        "Mak",
        "Je Wei",
        "Mr",
        "6012345678",
        "0000-00-00",
        "motor"
    ]
],
"sColumns": "first_name,last_name,salutation,number,birthday,group_name"}

```

JSON response using **sServerMethod** POST

```
{
"sEcho": 1,
"iTotalRecords": 10,
"iTotalDisplayRecords": 0,
"aaData": [],
"sColumns": "first_name,last_name,salutation,number,birthday,group_name"}

```

This is my javascript code

```
$('#table1').dataTable({
        "bProcessing": true,
        "bServerSide": true,            
        "sPaginationType": "bootstrap",
        "sAjaxSource": config.base_url + "contact/popup_contact",
        "sServerMethod": "POST"

    });

```

My function in contact controller

```
function popup_contact()
{
    $this->datatables
         ->select('first_name,last_name,salutation,number,birthday,group_name')
         ->from('tb_contact')
         ->join('tb_contact_group', 'tb_contact.contact_group_id = tb_contact_group.contact_group_id');          

    echo $this->datatables->generate();             

}

```