Added a function that will be called on success ajax request.