We can check the child window is opened or not.
Coding
var ChildWin;
if(ChildWin && !ChildWin.closed)
{
ChildWin.focus();
}
else
{
ChildWin= window.open(‘url’)
}
if(ChildWin && !ChildWin.closed)
{
ChildWin.focus();
}
else
{
ChildWin= window.open(‘url’)
}