shuga
August 1st, 2003, 11:59 AM
I've written this function and I would like to change the top and left values to variables so that the window will appear 100 px from the top right of the screen not the top left
so i just need to figure out how to detect the horizontal screen resolution and then position the window 100 px + the pop up window width away from that number
here's the script i have so far
<!-- begin pop up window function -->
<SCRIPT LANGUAGE="Java-Script">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=300, top=100, left=100, height=400');");
}
</script>
<!-- end pop up window function -->
so i just need to figure out how to detect the horizontal screen resolution and then position the window 100 px + the pop up window width away from that number
here's the script i have so far
<!-- begin pop up window function -->
<SCRIPT LANGUAGE="Java-Script">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=300, top=100, left=100, height=400');");
}
</script>
<!-- end pop up window function -->