View Full Version : Window PopUPs

10-21-2003, 07:14 AM
I have a script that allows me to set the size of each popup windows independently, how can i modify this script so that i can set the position of the window also ? I have pasted the script below:

<script type="text/javascript">
function openWindow(url,h,w){

This is in the body

<a href="http://" onclick="openWindow('products.html','400','300');return false">Open window</a>

10-21-2003, 07:40 AM
Try this:
function openWindow( url, h, w, x, y )
w = window.open(url, "", "height="+h+", width="+w+",scrollbars,status");
w.moveTo( x, y );

Then call it like this:
<a href="#" onclick="openWindow('products.html', '400', '300', '0', '0');">Open window</a>Good luck.