Character buttons in javascript