Last active
August 29, 2015 14:03
-
-
Save thotbox/aefdd2df3383f9b1a741 to your computer and use it in GitHub Desktop.
JavaScript: Popup Function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Popup | |
function popupCenter(pageURL,title,w,h) { | |
var left = (window.screen.width/2)-(w/2); | |
var top = (window.screen.height/2)-(h/2); | |
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment