[Javascript] positioning: window.open()
Tom Churm
thomas.churm at pixelpark.com
Thu Apr 5 03:29:55 CDT 2001
hi,
i usually use this code to open a new "pop-up window":
<script language="JavaScript">
<!--
function openHelpWindow () {
helpWindow = window.open ("popup.html", "MyWindow",
"menu=no,toolbar=no,location=no,scrollbars=no,width=800,height=600,res
izable=no");
helpWindow.moveTo((screen.width-420)/2, (screen.height-310)/2);
helpWindow.focus();
}
// -->
</script>
i've found that there are errors when an Absolute URL is used, ie:
when the URL for "popup.html" is something like
"http://someserver.com/popup.html". since i frequently need to center
or position pop-ups, i need to find an alternative.
i saw somewhere coding that uses something like top=100; left=200; to
position a new window, but cannot find any references to this.
any suggestions would be greatly appreciated.
thanks,
tom
More information about the Javascript
mailing list