raising an opened window...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mel

    #1

    raising an opened window...

    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


  • DJ WIce

    #2
    Re: raising an opened window...

    : 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.ope n("URL_of_AAA", "","scrollbars= 1,menubar=1,sta tus=1,width=560 ,
    height=402,left =35,top=110");
    info.document.c lose();
    }
    }


    and then set in the window that you open something like:

    <body onclose="parent .info=null;">

    Wouter


    Comment

    Working...