| The Javascript open function does not support opening new
windows maximized, but it does support opening opening windows at a
certain size. The problem being that Netscape and Internet Explorer do
this differently and not all versions of all the browsers support the
sizing on the open command so we need to double up and resize the window
again once its opened.
This function accepts a URL to display in the window and the logical
name of the window, if a window with that logical name is already open
it will be brought to the front. The function returns the handle to the
window.
function f_open_window_max( aURL, aWinName )
{
var wOpen;
var sOptions;
sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
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;
}
| Tested on Browser |
OK |
| IE 5 |
Y |
| IE 4 |
Y |
|