added script; added onlick in edit button