You are here: irt.org | FAQ | JavaScript | Screen | Q433 [ previous next ]
In Netscape Navigator 4 and Internet Explorer 4 try this:
<SCRIPT LANGUAGE="JavaScript"><!--
function openWindowBottomRight(x,y) {
var xMax = 640, yMax=480; // default
if (document.all) var xMax = screen.width, yMax = screen.height;
else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight;
var xOffset = xMax - x, yOffset = yMax - y;
msgWindow = window.open('apage.html','newWin','width='+x+',height='+y+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
}
//--></SCRIPT>
<FORM>
<INPUT TYPE="BUTTON" onClick="openWindowBottomRight(640,480)" VALUE="Open Window Bottom Right">
</FORM>