raising an opened window...

M

Mel

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 ?

many thanks

Mel
 
D

DJ WIce

: 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,menubar=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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top