Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* 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