Thooms
03-21-2005, 05:23 PM
Ok, I had a popup with this script:
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=640');");
}
// -->
</script>
To be opened with this link:
<a href="javascript:popUp('popup.htm')"></a>
..
The solution was to add:
left=xxx,top=xxx
.. to the script, replacing xxx with the amount of pixels from the left/top of your screen, you want the top left corner of your popup to be when you open it...
e.g:
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=640,left=300,t op=100');");
}
// -->
</script>
.. If I wanted to have the top left corner positioned 300 pixels from the left of my screen and 100 pixels from the top of my screen, when I opened it...
:D
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=640');");
}
// -->
</script>
To be opened with this link:
<a href="javascript:popUp('popup.htm')"></a>
..
The solution was to add:
left=xxx,top=xxx
.. to the script, replacing xxx with the amount of pixels from the left/top of your screen, you want the top left corner of your popup to be when you open it...
e.g:
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=640,left=300,t op=100');");
}
// -->
</script>
.. If I wanted to have the top left corner positioned 300 pixels from the left of my screen and 100 pixels from the top of my screen, when I opened it...
:D