Adding an ajax method