JS code added for page update