Hi!
Following is my ajax code:
jQuery.ajax({
'type': 'POST',
'dataType': 'json',
'contentType': 'application/json; charset=utf-8',
'url': 'http://localhost/main/user/view',
'data': ({'active' : 'active_value'}),
'success': function(data){
alert('Good Return Text');
}
});
My CI controller’s method code is as follows:
function view()
{
if($this->input->is_ajax_request()){
var_dump($this->input->post('active'));
}
}
The Firebug is showing following post resuest :
active=active_value
The Firebug is showing following response :
bool(false)
Can someone guide me what Iam doing wrong.
NOTE: CI version: 2.0 , jQuery version: 1.5
Thanks in advance