Java Script first edit