I have problem in ajax posting. i try to get category when select parent category in drop down.but data is post.

my business controller

```
 public function getcat($id)
{
    echo "sdfad";
    $cr=new Categoryrepo();
    header('Content-Type: application/x-json; charset=utf-8');
    echo(json_encode($cr->getcatbyparentid($id)));
}

```

my category model

```
 public function getcatbyparentid($id)
{
    $this->db->select('id,name');
    $this->db->from('category');
    $this->db->where('parent',$id);
   return $query=$this->db->get();
}

```

my ajax code

```
 $(document).ready(function(){
   $("#parent").change(function(){
        var id=$('#parent').val();
        alert(id);
        $.ajax({
            type:"POST",
            url:"<?php echo base_url()?>business/getcat/"+id,
            success: function(data)
            {
                alert(data);
            }
        });
    });
});

```

please help me how to solve it