Methods for handling AJAX activities.