[eluser]SPeed_FANat1c[/eluser]
Hi,
simple function, but I can't find an error
Here is the function which should return some result to javasc+ipt:
Code:
function get_comments_per_page_ajax()
{
//$this->load->model('Nustatymai_model');
//$nust = $this->Nustatymai_model->gauti_nust();
//$count = array('count' => $nust->koment_sk);
$count = 'test';
echo $count;
}
and here is the javascript, which takes the data from function:
Code:
$.ajax({
url: CI.base_url + 'details/get_comments_per_page_ajax',
dataType: 'text',
type: 'post',
success: function (j) {
alert(j);
}
});
The function alerts '<!---->test'.
I don't understand why it adds <!----> ?