Created
April 26, 2011 14:32
-
-
Save rafaelrinaldi/942360 to your computer and use it in GitHub Desktop.
A script that shows a popup in the middle of the screen.
This file contains 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
function popup(p_url, p_title, p_width, p_height) { | |
var left = (screen.width * .5) - (p_width * .5); | |
var top = (screen.height * .5) - (p_height * .5); | |
var target = window.open(p_url, p_title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + p_width + ', height=' + p_height + ', top=' + top + ', left=' + left); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment