Trying to make an ajax call and get something as response in phpfox .
the JS :
$.ajaxCall('module.check_whether_first_time',
'u_id='+u_id+'&my_user_id='+my_user_id).done(function(data) {
alert(" data = " + data )
});
The function which the ajax calls from within ajax.class.php :
public function check_whether_first_time(){
$u_id = $this->get('u_id');
$my_user_id=$this->get('my_user_id');
// processing with data goes here
$counter=1;
echo $counter;
}// end of function check_whether_first_time
I want to get the value of $counter
in data
variable. The code does not work but FireBug shows the ajax request with no result returned as response. What is the way ?