Adding AJAX action to complete task