add updatePosition JavaScript function and bind it to the Refresh link