javaScript update