Update image using javascript instead of page update