JAVASCRIPT - BASE UPDATE