[thelist] Window open full width, height...

Chris George cgeorge at basecorp.com
Fri Mar 4 09:48:53 CST 2005


Hey,

We have a learning module that we want to open up "fullscreen" (but not
using the fullscreen flag). Currently this code works if you open it
once, but throws an error on line 17 if you click it again:
<html>
<head>
<title>Popup Test</title>
<script>
function f_open_window_max( aURL, aWinName )
{
   var wOpen;
   var sOptions;

   sOptions =
'status=no,menubar=no,scrollbars=no,resizable=yes,toolbar=no';
   sOptions = sOptions + ',width=' + (screen.availWidth -
10).toString();
   sOptions = sOptions + ',height=' + (screen.availHeight -
122).toString();
   sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

   wOpen = window.open( '', aWinName, sOptions );
   wOpen.location = aURL;
   wOpen.focus();
   wOpen.moveTo( 0, 0 );
   wOpen.resizeTo( screen.availWidth, screen.availHeight );
   return wOpen;
}
</script>
</head>
<body>
<a href="#"
onClick="f_open_window_max('someurl.htm','GettingStarted');">Pop Me</a>
</body>
</html>


More information about the thelist mailing list