window.close() will close your current window for you in javascript I’m not sure about refreshing the parent window.