: i have popup window that maybe covered by other windows or minimized
:
: how can i use javascript to check for existence of a window named "AAA"
and
: if exist
: open and raise it to the top of the stack so that its becomes viewable ?
You can only do that if that window is opend by your website and if the URL
of that pop-up is also your website. If it's an advertisement it's not
possible from your mainpage.
You can scan for all child windows and then focus(); the one with that name.
But you could also do something like this:
var info=null;
function check()
{
if (info!=null)
{
if (!info.closed)
info.focus();
}
else
{
info=window.open("URL_of_AAA","","scrollbars=1,men ubar=1,status=1,width=560,
height=402,left=35,top=110");
info.document.close();
}
}
and then set in the window that you open something like:
<body onclose="parent.info=null;">
Wouter