You are here: irt.org | FAQ | JavaScript | Window | Q1404 [ previous next ]
Possibly. The following will only work on Netscape Navigator 4 (but not on unix platforms):
<html> <head> <script language="JavaScript"><!-- // default values: var x = 400; var y = 400; //--></script> <script language="JavaScript1.2"><!-- x = window.screenX + window.outerWidth; y = window.screenY + 50; var popup = window.open('popup.htm','popup','width=100,height=100,top='+y+',screenY='+y+',left='+x+',screenX='+x); function moved(e) { popup.screenX = window.screenX + window.outerWidth; popup.screenY = window.screenY + window.outerWidth; } //--></script> </head> <body onMove="moved()"> .... </body> </html>
And then in the popup window:
<html> <head> <script language="JavaScript"><!-- function moved(e) { opener.screenX = window.screenX - opener.outerWidth; opener.screenY = window.screenY - opener.outerWidth; } //--></script> </head> <body onMove="moved()"> .... </body> </html>