Last active
August 29, 2015 14:11
-
-
Save ludo6577/e276141633eeeeeef2e6 to your computer and use it in GitHub Desktop.
Javascript: Open / Close window
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 close_popupWindow() { | |
window.self.opener = window.self; | |
window.self.close(); | |
} |
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
var wnd; | |
function open_popupWindow() { | |
var w = 700; | |
var h = 400; | |
var left = (screen.width / 2) - (w / 2); | |
var top = (screen.height / 2) - (h / 2); | |
wnd = window.open('../Pages/shareDialog.html', 'share', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left); | |
/* | |
* Set the text in the window | |
*/ | |
setWindowContent(); | |
return wnd; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment