AJAX server response helper