frequently ask ? : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 25 people (64%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Clicking a button,new window is opened &it is minimised.If same button clicked,same window be opened

Jun 19th, 2001 02:26
Jean-Bernard Valentaten, Srikant Keerti,


If you had read the manual, you'd know it!!
Here's the answer anyway:
var someXValue = 800;
var someYValue = 600;
function winHandle()
{
  if (newWin && !newWin.closed)
  {
    newWin.resizeTo(someXValue, someYValue);
    newWin.focus();
  }
  else
  {
    newWin = window.open
('www.someURL.someTLD/someFile', 'newWin', 'width = 10, height = 10, 
resizable=yes');
    newWin.blur();
    self.focus();
  }
}
HTH