window.open() is a method to open a new browser window.
Javascript code to open window popup center aligned to page with close event on button click:
$(btn-container).on("click", function() { var w = 620; var h = 350; var win = window.open('http://achieveee.com', 'Achieveee', 'resizable,toolbar=0,location=0,scrollbars=1,menubar=0,width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+''); var timer = setInterval(function() { if (win.closed) { clearInterval(timer); alert('closed'); } }, 1000); });