Adding maxlength and clear row

set up javascript to clear row on click