submit method via button or enter key