update javascript not function