You must save the link to the popup that you open and invoke the focus method on it.
var win = window.open(url, name, args); win.focus();
When you open a popup, if you specify a name, and the next time you open a popup with the same name, it will use the same popup if it is not closed. You just need to focus it.
You can use this simple function to handle pop-ups.
function windowOpener(url, name, args) { if(typeof(popupWin) != "object" || popupWin.closed) { popupWin = window.open(url, name, args); } else{ popupWin.location.href = url; } popupWin.focus(); }
source share