Update ajax snippet