JavaScript update