$.ajax({
type: 'POST',
url: '/ci_practice/blog/reviews',
data: 'res_id='+res_id,
success: function(data){
$('#screen-overlay').show(slow);
$('#screen-overlay').html(data);
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
console.log(xhr.responseText);
alert(thrownError);
}
});
This throws me a 500 error. There is a problem in accessing the function reviews as shown by console.log(xhr.responseText); in console.
How should i assign value to url in ajax to perform this in a codeigniter way. I have jQuery in a different file : ajax.js
Will appreciate your response. Thank You.
$config['csrf_protection']in config.php and set it toFALSEif it's enabled.