javascript udpate