CalifNina
06-09-2003, 04:06 PM
I'm looking for some simple script to center a second window, versus whereever it just happens to come up and display.
Here is my current code:<SCRIPT TYPE="text/javascript"> //Opens new window "sounds"
function openWindow4()
{
window.open("sounds.html","myWindow","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory= yes,width=725,height=400")
}
</SCRIPT>All I'd like to do is center it on the screen; just do not know how to mathematically script and capture the information to figure out the centering. Also, I'm aware I could enter "top=0,left=0" and that would, for example, place it in the top-left position of the screen.
Please, asking for help in the needed scripting???
Here is my current code:<SCRIPT TYPE="text/javascript"> //Opens new window "sounds"
function openWindow4()
{
window.open("sounds.html","myWindow","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory= yes,width=725,height=400")
}
</SCRIPT>All I'd like to do is center it on the screen; just do not know how to mathematically script and capture the information to figure out the centering. Also, I'm aware I could enter "top=0,left=0" and that would, for example, place it in the top-left position of the screen.
Please, asking for help in the needed scripting???