Updating using JS