Created
June 13, 2016 15:31
-
-
Save pstrinkle/6ff1c758bfd4cd86f0247ef60e45738d to your computer and use it in GitHub Desktop.
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
/** | |
* launch_popup | |
* | |
* Launch a popup for the url provided. | |
*/ | |
function launch_popup(url) { | |
var wwidth = $(window).width(); | |
var wheight = $(window).height(); | |
var width = (wwidth > 600) ? 600 : wwidth - 50; | |
var height = (wheight > 650) ? 650 : wheight - 50; | |
var options = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width="+width+",height="+height+",left=20,top=20"; | |
popup = window.open(url, "", options); | |
popup.creater = top; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment