I use ajax with jquery and when I tried to display the result in popup. Then alert always displays 0
0
success : function(results) { alert(result
Try to add die(); or exit(); at the very last line of the function.
die();
exit();