handle button events instead of links