[Javascript] positioning: window.open()

Ian Turner ian.turner at romseyassoc.com
Thu Apr 5 04:03:43 CDT 2001


Why not open the window with a local url, move it and then load up the
external url using window.location.replace();
I know this is a workaround but...


All the best
	Ian

-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Tom Churm
Sent: 05 April 2001 09:30
To: javascript at LaTech.edu
Subject: [Javascript] positioning: window.open()


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

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list