DHTML Methods
Moves the screen position of the upper-left corner of the window to the specified iX and iY pixel position.
window.moveTo ( iX, iY )
iX |
Required. Horizontal scroll offset, in pixels. |
iY |
Required. Vertical scroll offset, in pixels. |
No return value.
When you open a window you can with IE set left and top in the feature string, and with NN set screenX and screenY, so together you can for example write:
window.open ( 'whatever.html', 'windowName',
'left=100, screenX=100, top=100, screenY=100' )
where you can of course add further features like width, height, scrollbars, menubar, etc.
Once a window is open, you can move it calling the moveTo or moveBy methods of the window object:
var win = open ( 'whatever.html', 'windowName' );
win.moveTo ( 200, 200 );
To retrieve the current coordinates of a window, for IE, use:
window.screenLeft
window.screenTop
and for NN:
window.screenX
window.screenY
window