Add ajax on error, update ajax on success