Add output buffering for ajax.php