Try this:
Code:
<html>
<head>
<title>Javascript popup windows</title>
<script language="javascript">
<!--
function openPopUp(WindowURL,WindowName,X,Y){
T = (window.screen.height/2) - (Y/2);
L = (window.screen.width/2) - (Y/2);
newPopUp = window.open(WindowURL,WindowName,'toolbar=no,location=no,directories=no,status=no,resizable=no,copyhistory=no,top='+ T +',left='+ L +',width=' + X +',height=' + Y)
}
//-->
</script>
</head>
<body>
<a href="#" onClick="openPopUp('http://www.mysite.com','myWindow',300,200)">window 1 size 300x200</a>
<a href="#" onClick="openPopUp('http://www.mysite.com','myOtherWindow',350,250)">window 2 size 350x250</a>
</body>
</html>
when you call the function openPopUp() you pass it a url name for the new window and the X and Y dimensions of the new window.
<Edited by Drinky on 01-30-2001 at 11:25 PM>
Bookmarks