How do I center the new popup window on the screen? I seen many posts on this, but Sorry I am not good in Javascript and dont really know how to make changes this code. I use this code to automatically link the form's dropdown item to a new page.
Here it is:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler2(form) {
var windowprops = "height=730,width=1018,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=no";
var URL = Logon.site.options[Logon.site.selectedIndex].value;
popup = window.open(URL,"MenuPopup",windowprops);
}
// End -->
</script>
Than I have the form with this on it:
onChange="formHandler2(this.form)"
Everything works great, just that the new window comes up on the bottom-right of the screen.
I wanted the window to just center on the screen.
Anyone can help me with this please?
Here it is:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler2(form) {
var windowprops = "height=730,width=1018,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=no";
var URL = Logon.site.options[Logon.site.selectedIndex].value;
popup = window.open(URL,"MenuPopup",windowprops);
}
// End -->
</script>
Than I have the form with this on it:
onChange="formHandler2(this.form)"
Everything works great, just that the new window comes up on the bottom-right of the screen.
I wanted the window to just center on the screen.
Anyone can help me with this please?