Add AJAX functionality.