window.open - restore on the screen a minimized window

  • Thread starter Nicolae Fieraru
  • Start date
N

Nicolae Fieraru

Hi All,

I use a simple function on a web site, based on this function:

function goVisitSite(Site)
{
NewWindow1 = window.open(Site,
"viewwin",
"toolbar=0,menubar=0,width=900,height=280,top=0,left=0,scrollbars=1,resizable=yes");
}

On the main page I have a link which opens a new window with some details.
If I minimize that window, next time I click on a link to open it again, the
content of the page changes, but the window remains minimized in the
taskbar. Is there a way of restoring the window to the screen once I call
the above function?

Regards,
Nicolae
 
G

Grant Wagner

Nicolae Fieraru said:
Hi All,

I use a simple function on a web site, based on this function:

function goVisitSite(Site)
{
NewWindow1 = window.open(Site,
"viewwin",

"toolbar=0,menubar=0,width=900,height=280,top=0,left=0,scrollbars=1,resizable=yes");
}

On the main page I have a link which opens a new window with some
details. If I minimize that window, next time I click on a link to
open it again, the content of the page changes, but the window remains
minimized in the taskbar. Is there a way of restoring the window to
the screen once I call the above function?

Regards,
Nicolae

NewWindow1 = window.open(...);
if (NewWindow1)
{
NewWindow1.focus();
}

Although on some versions of Internet Explorer, this will not "Restore"
the window, but rather will flash the taskbar icon.

Other platforms, operating systems and Web browsers, it may do anything
from your desired behaviour to nothing at all.
 
F

frizzle

Maybe - not sure - in the popup put the following in the body tag:
onLoad="this.focus()"
 
N

Nicolae Fieraru

Thank you very much, frizzle, this did the trick for IE6 and for Netscape
7.02

Best regards,
Nicolae
 
N

Nicolae Fieraru

Hi Grant,

Thank you very much for your advice. I didn't test it, because I would have
had to implement the method on more pages, while the solution Frizzle
offered is more convenient for me.

Best regards,
Nicolae
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top