-
-
Save ohidurbappy/eb17b98a225e554d119a30cf523432cd to your computer and use it in GitHub Desktop.
javascript popup close callback event.
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Popup Example</title> | |
</head> | |
<body> | |
<script> | |
function popupCallback(str){ | |
alert("This is callback:" + str); | |
} | |
function openPopup(){ | |
popname = window.open( "pop.htm", "popname", "status=1, height=200, width=200, toolbar=0,resizable=0"); | |
popname.window.focus(); | |
} | |
</script> | |
<a href="javascript:openPopup();">Click to open popup</a> | |
</body> | |
</html> |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>query data</title> | |
<script type="text/javascript"> | |
window.opener.popupCallback('pop some data'); //Call callback function | |
window.close(); // Close the current popup | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment