edit not working javascripts