Created
August 24, 2009 07:47
-
-
Save erotte/173723 to your computer and use it in GitHub Desktop.
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
// =================================== | |
// = Bullet Proof Popups, 1997 style = | |
// =================================== | |
Popup: { | |
base: function(url, options, popupName){ | |
popupName = window.open(url,popupName,options); | |
if (popupName){ | |
if (popupName.focus) popupName.focus(); | |
} | |
return false; | |
}, | |
link_with_size: function(url, width, height) { | |
Popup.base(url, 'width='+width+',height='+height+',toolbar=0,menubar=0,resizable=1,scrollbars=1,status=1,left=200,top=100', name ); | |
// return false would break usage with pseudo protocol (href="javascript:Popup.link_with_size()") | |
}, | |
standard: function(url, name) { | |
Popup.base(url, 'width=550,height=650,toolbar=0,menubar=0,resizable=1,scrollbars=1,status=1,left=200,top=100', name ); | |
return false; | |
} | |
// Add custom Popup wrapper methods | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment