fixed update function, fixed update button appearance

added window.onload to load the script after all other scripts and links finished loading