center window.open on form submit
My code looks like this: <script type="text/javascript"> function directions(sacred) { var x = screen.width / 2 - 700 / 2; var y = screen.height / 2 - 450 / 2; window.open(sacred.action, 'Directions', 'height=485,width=700,left=' + x + ',top=' + y); return false; } </script> <form action="http://maps.google.com/maps" method="get" target="Directions" onsubmit="return directions(sacred);"> I don't understand js, so take it easy on me if it looks sloppy. I can get this to work fine: <form action="http://maps.google.com/maps" method="get" target="Directions" onsubmit="Directions=window.open('about