I am returning some values from jquery ajax. I am getting the result but with this I am also getting a error. Please first of all take a look at code
function get_CommentCount(handleData) {
$.ajax({
url: 'Profile/get_CommentCount',
type: "post",
dataType: 'json',
success: function(data) {
handleData(data);
}
});
}
calling this function like this
get_CommentCount(function(output) {
console.log('output', output)
});
Its give me error that TypeError: handleData is not a function. Please anybody tell me why I am getting this error. I have gone through the stackoverflow questions but I am not finding any solution for me. May be you find it duplicate but I post this question after surfing the stackoverflow.
Thanks