Handle the click of a button