Full version: jsB@nk » Browser » Window » Auto-centering Popup Window
URL: https://www.javascriptbank.com/auto-centering-popup-window.html
Use this practical DHTML script to not only open up links in a secondary popup window, but one that's centered in the middle of the user's screen!
Full version: jsB@nk » Browser » Window » Auto-centering Popup Window
URL: https://www.javascriptbank.com/auto-centering-popup-window.html
<script language="javascript">// Auto center window script- Eric King (http://redrival.com/eak/index.shtml)var win = null;function NewWindow(mypage,myname,w,h,scroll){LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;TopPosition = (screen.height) ? (screen.height-h)/2 : 0;settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'win = window.open(mypage,myname,settings)}</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<a href="popup_content.html" onclick="NewWindow(this.href,'name','400','400','yes');return false">Open popup</a><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->