Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q886 How can I maximise and bring the popup window to the top, from within the window that opens it?

You are here: irt.org | FAQ | JavaScript | Window | Q886 [ previous next ]

Try:

<script language="JavaScript"><!--
function maximiseWindow(winRef) {
  if (window.screen) {
    winRef.moveTo(0,0);
    winRef.outerHeight = screen.availHeight;
    winRef.outerWidth = screen.availWidth;
  }
}

function alterWindow(winRef) {
  maximiseWindow(winRef);
  winRef.focus();
}

var windowHandle = window.open('a.html','winname','fullscreen=yes');

setTimeout('alterWindow(windowHandle)', 1);
//--></script>

©2018 Martin Webb