I need to focus the existing parent window tab in the browser while closing the child window popup. But i can able to do for opening new parent window and focus it. Is that possible to open the existing parent window browser tab with focused?.
My code
function closepopup() {
var winRef = window.opener.location;
var parentwindow = window.open(winRef, '');
parentwindow.focus();
window.close();
return false;
}